Skip to content

Commit fe22e68

Browse files
committed
constants visibility (possible BC break)
1 parent 7edb7d6 commit fe22e68

File tree

11 files changed

+15
-17
lines changed

11 files changed

+15
-17
lines changed

src/DI/Config/Adapters/IniAdapter.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ final class IniAdapter implements Nette\DI\Config\IAdapter
2020
{
2121
use Nette\SmartObject;
2222

23-
/** @internal */
24-
const
23+
private const
2524
KEY_SEPARATOR = '.', // key nesting key1.key2.key3
2625
ESCAPED_KEY_SEPARATOR = '..',
2726
RAW_SECTION = '!';

src/DI/Config/Adapters/NeonAdapter.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ final class NeonAdapter implements Nette\DI\Config\IAdapter
2222
{
2323
use Nette\SmartObject;
2424

25-
/** @internal */
26-
const PREVENT_MERGING = '!';
25+
private const PREVENT_MERGING = '!';
2726

2827

2928
/**

src/DI/Config/Helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class Helpers
1919
{
2020
use Nette\StaticClass;
2121

22-
const
22+
public const
2323
EXTENDS_KEY = '_extends',
2424
OVERWRITE = true;
2525

src/DI/Config/Loader.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ class Loader
2020
{
2121
use Nette\SmartObject;
2222

23-
/** @internal */
24-
const INCLUDES_KEY = 'includes';
23+
private const INCLUDES_KEY = 'includes';
2524

2625
private $adapters = [
2726
'php' => Adapters\PhpAdapter::class,

src/DI/Container.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ class Container
1919
{
2020
use Nette\SmartObject;
2121

22-
const TAGS = 'tags';
22+
public const TAGS = 'tags';
2323

24-
const TYPES = 'types';
24+
public const TYPES = 'types';
2525

26-
const SERVICES = 'services';
26+
public const SERVICES = 'services';
2727

28-
const ALIASES = 'aliases';
28+
public const ALIASES = 'aliases';
2929

3030
/** @var array user parameters */
3131
public $parameters = [];

src/DI/ContainerBuilder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class ContainerBuilder
2424
{
2525
use Nette\SmartObject;
2626

27-
const THIS_SERVICE = 'self',
27+
public const
28+
THIS_SERVICE = 'self',
2829
THIS_CONTAINER = 'container';
2930

3031
/** @var array */

src/DI/DependencyChecker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class DependencyChecker
2222
{
2323
use Nette\SmartObject;
2424

25-
const VERSION = 1;
25+
public const VERSION = 1;
2626

2727
/** @var array of ReflectionClass|\ReflectionFunctionAbstract|string */
2828
private $dependencies = [];

src/DI/Extensions/InjectExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
final class InjectExtension extends DI\CompilerExtension
2121
{
22-
const TAG_INJECT = 'inject';
22+
public const TAG_INJECT = 'inject';
2323

2424

2525
public function beforeCompile()

src/DI/ServiceDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class ServiceDefinition
2323
{
2424
use Nette\SmartObject;
2525

26-
const
26+
public const
2727
IMPLEMENT_MODE_CREATE = 'create',
2828
IMPLEMENT_MODE_GET = 'get';
2929

tests/DI/Compiler.arguments.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require __DIR__ . '/../bootstrap.php';
1515

1616
class Lorem
1717
{
18-
const DOLOR_SIT = 10;
18+
public const DOLOR_SIT = 10;
1919

2020
public $args;
2121

0 commit comments

Comments
 (0)