Skip to content

Commit 934ac27

Browse files
Merge branch '5.1' into 5.2
* 5.1: Update .php_cs.dist Apply "visibility_required" CS rule to constants
2 parents 130ac51 + fb0f2aa commit 934ac27

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

Generator/UrlGeneratorInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,25 @@ interface UrlGeneratorInterface extends RequestContextAwareInterface
3434
/**
3535
* Generates an absolute URL, e.g. "http://example.com/dir/file".
3636
*/
37-
const ABSOLUTE_URL = 0;
37+
public const ABSOLUTE_URL = 0;
3838

3939
/**
4040
* Generates an absolute path, e.g. "/dir/file".
4141
*/
42-
const ABSOLUTE_PATH = 1;
42+
public const ABSOLUTE_PATH = 1;
4343

4444
/**
4545
* Generates a relative path based on the current request path, e.g. "../parent-file".
4646
*
4747
* @see UrlGenerator::getRelativePath()
4848
*/
49-
const RELATIVE_PATH = 2;
49+
public const RELATIVE_PATH = 2;
5050

5151
/**
5252
* Generates a network path, e.g. "//example.com/dir/file".
5353
* Such reference reuses the current scheme but specifies the host.
5454
*/
55-
const NETWORK_PATH = 3;
55+
public const NETWORK_PATH = 3;
5656

5757
/**
5858
* Generates a URL or path for a specific route based on the given parameters.

Loader/XmlFileLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class XmlFileLoader extends FileLoader
3131
use LocalizedRouteTrait;
3232
use PrefixTrait;
3333

34-
const NAMESPACE_URI = 'http://symfony.com/schema/routing';
35-
const SCHEME_PATH = '/schema/routing/routing-1.0.xsd';
34+
public const NAMESPACE_URI = 'http://symfony.com/schema/routing';
35+
public const SCHEME_PATH = '/schema/routing/routing-1.0.xsd';
3636

3737
/**
3838
* Loads an XML file.

Matcher/TraceableUrlMatcher.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
*/
2424
class TraceableUrlMatcher extends UrlMatcher
2525
{
26-
const ROUTE_DOES_NOT_MATCH = 0;
27-
const ROUTE_ALMOST_MATCHES = 1;
28-
const ROUTE_MATCHES = 2;
26+
public const ROUTE_DOES_NOT_MATCH = 0;
27+
public const ROUTE_ALMOST_MATCHES = 1;
28+
public const ROUTE_MATCHES = 2;
2929

3030
protected $traces;
3131

Matcher/UrlMatcher.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
*/
2929
class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface
3030
{
31-
const REQUIREMENT_MATCH = 0;
32-
const REQUIREMENT_MISMATCH = 1;
33-
const ROUTE_MATCH = 2;
31+
public const REQUIREMENT_MATCH = 0;
32+
public const REQUIREMENT_MISMATCH = 1;
33+
public const ROUTE_MATCH = 2;
3434

3535
/** @var RequestContext */
3636
protected $context;

RouteCompiler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ class RouteCompiler implements RouteCompilerInterface
2222
/**
2323
* @deprecated since Symfony 5.1, to be removed in 6.0
2424
*/
25-
const REGEX_DELIMITER = '#';
25+
public const REGEX_DELIMITER = '#';
2626

2727
/**
2828
* This string defines the characters that are automatically considered separators in front of
2929
* optional placeholders (with default and no static text following). Such a single separator
3030
* can be left out together with the optional placeholder from matching and generating URLs.
3131
*/
32-
const SEPARATORS = '/,;.:-_~+*=@|';
32+
public const SEPARATORS = '/,;.:-_~+*=@|';
3333

3434
/**
3535
* The maximum supported length of a PCRE subpattern name
3636
* http://pcre.org/current/doc/html/pcre2pattern.html#SEC16.
3737
*
3838
* @internal
3939
*/
40-
const VARIABLE_MAXIMUM_LENGTH = 32;
40+
public const VARIABLE_MAXIMUM_LENGTH = 32;
4141

4242
/**
4343
* {@inheritdoc}

Tests/RouteCompilerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,5 +394,5 @@ public function provideRemoveCapturingGroup()
394394

395395
class Utf8RouteCompiler extends RouteCompiler
396396
{
397-
const SEPARATORS = '';
397+
public const SEPARATORS = '';
398398
}

0 commit comments

Comments
 (0)