Skip to content

Commit 1e1d4eb

Browse files
Merge branch '3.4' into 4.4
* 3.4: Enable "native_constant_invocation" CS rule Make AbstractPhpFileCacheWarmer public
2 parents 19298db + 5da4010 commit 1e1d4eb

File tree

58 files changed

+95
-98
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+95
-98
lines changed

CacheWarmer/AbstractPhpFileCacheWarmer.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
use Symfony\Component\Config\Resource\ClassExistenceResource;
1818
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
1919

20-
/**
21-
* @internal
22-
*/
2320
abstract class AbstractPhpFileCacheWarmer implements CacheWarmerInterface
2421
{
2522
private $phpArrayFile;

CacheWarmer/AnnotationsCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class AnnotationsCacheWarmer extends AbstractPhpFileCacheWarmer
3838
public function __construct(Reader $annotationReader, string $phpArrayFile, $excludeRegexp = null, $debug = false)
3939
{
4040
if ($excludeRegexp instanceof CacheItemPoolInterface) {
41-
@trigger_error(sprintf('The CacheItemPoolInterface $fallbackPool argument of "%s()" is deprecated since Symfony 4.2, you should not pass it anymore.', __METHOD__), E_USER_DEPRECATED);
41+
@trigger_error(sprintf('The CacheItemPoolInterface $fallbackPool argument of "%s()" is deprecated since Symfony 4.2, you should not pass it anymore.', __METHOD__), \E_USER_DEPRECATED);
4242
$excludeRegexp = $debug;
4343
$debug = 4 < \func_num_args() && func_get_arg(4);
4444
}

CacheWarmer/RouterCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function warmUp($cacheDir)
4949
return;
5050
}
5151

52-
@trigger_error(sprintf('Passing a %s without implementing %s is deprecated since Symfony 4.1.', RouterInterface::class, WarmableInterface::class), E_USER_DEPRECATED);
52+
@trigger_error(sprintf('Passing a %s without implementing %s is deprecated since Symfony 4.1.', RouterInterface::class, WarmableInterface::class), \E_USER_DEPRECATED);
5353
}
5454

5555
/**

CacheWarmer/SerializerCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class SerializerCacheWarmer extends AbstractPhpFileCacheWarmer
3737
public function __construct(array $loaders, string $phpArrayFile)
3838
{
3939
if (2 < \func_num_args() && func_get_arg(2) instanceof CacheItemPoolInterface) {
40-
@trigger_error(sprintf('The CacheItemPoolInterface $fallbackPool argument of "%s()" is deprecated since Symfony 4.2, you should not pass it anymore.', __METHOD__), E_USER_DEPRECATED);
40+
@trigger_error(sprintf('The CacheItemPoolInterface $fallbackPool argument of "%s()" is deprecated since Symfony 4.2, you should not pass it anymore.', __METHOD__), \E_USER_DEPRECATED);
4141
}
4242
parent::__construct($phpArrayFile);
4343
$this->loaders = $loaders;

CacheWarmer/TemplateFinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\CacheWarmer;
1313

14-
@trigger_error('The '.TemplateFinder::class.' class is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.TemplateFinder::class.' class is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.', \E_USER_DEPRECATED);
1515

1616
use Symfony\Component\Finder\Finder;
1717
use Symfony\Component\HttpKernel\Bundle\BundleInterface;

CacheWarmer/TemplateFinderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\CacheWarmer;
1313

14-
@trigger_error('The '.TemplateFinderInterface::class.' interface is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.TemplateFinderInterface::class.' interface is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.', \E_USER_DEPRECATED);
1515

1616
/**
1717
* Interface for finding all the templates.

CacheWarmer/TemplatePathsCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\CacheWarmer;
1313

14-
@trigger_error('The '.TemplatePathsCacheWarmer::class.' class is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.TemplatePathsCacheWarmer::class.' class is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.', \E_USER_DEPRECATED);
1515

1616
use Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator;
1717
use Symfony\Component\Filesystem\Filesystem;

CacheWarmer/ValidatorCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct($validatorBuilder, string $phpArrayFile)
4242
throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be an instance of "%s", "%s" given.', __METHOD__, ValidatorBuilder::class, \is_object($validatorBuilder) ? \get_class($validatorBuilder) : \gettype($validatorBuilder)));
4343
}
4444
if (2 < \func_num_args() && func_get_arg(2) instanceof CacheItemPoolInterface) {
45-
@trigger_error(sprintf('The CacheItemPoolInterface $fallbackPool argument of "%s()" is deprecated since Symfony 4.2, you should not pass it anymore.', __METHOD__), E_USER_DEPRECATED);
45+
@trigger_error(sprintf('The CacheItemPoolInterface $fallbackPool argument of "%s()" is deprecated since Symfony 4.2, you should not pass it anymore.', __METHOD__), \E_USER_DEPRECATED);
4646
}
4747
parent::__construct($phpArrayFile);
4848
$this->validatorBuilder = $validatorBuilder;

Command/AboutCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8080
new TableSeparator(),
8181
['<info>PHP</>'],
8282
new TableSeparator(),
83-
['Version', PHP_VERSION],
83+
['Version', \PHP_VERSION],
8484
['Architecture', (\PHP_INT_SIZE * 8).' bits'],
8585
['Intl locale', class_exists('Locale', false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a'],
8686
['Timezone', date_default_timezone_get().' (<comment>'.(new \DateTime())->format(\DateTime::W3C).'</>)'],
87-
['OPcache', \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
88-
['APCu', \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
87+
['OPcache', \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
88+
['APCu', \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
8989
['Xdebug', \extension_loaded('xdebug') ? 'true' : 'false'],
9090
];
9191

Command/AbstractConfigCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected function listBundles($output)
6262
protected function findExtension($name)
6363
{
6464
$bundles = $this->initializeBundles();
65-
$minScore = INF;
65+
$minScore = \INF;
6666

6767
foreach ($bundles as $bundle) {
6868
if ($name === $bundle->getName()) {

0 commit comments

Comments
 (0)