<?php
namespace App\Services;
use acme\lib\SomeService;
use foo\lib\SomeOtherService;
final class AppService{ public function directDeprecationsTwoVendors() { $service1 =
new SomeService();
$service1->
deprecatedApi();
$service2 =
new SomeOtherService();
$service2->
deprecatedApi();
} public function selfDeprecation(bool
$useContracts = false
) { $args =
[__FUNCTION__, __FUNCTION__
];
if ($useContracts) { trigger_deprecation('App', '3.0',
sprintf('%s is deprecated, use %s_new instead.', ...
$args));
}