Issue #3050275 by Balu Ertl, borisson_: Replace remaining references of PSR-0 to PSR-4 instead
parent
be969606bc
commit
90e5675856
|
@ -13,7 +13,7 @@ use Drupal\Component\Plugin\Discovery\DiscoveryTrait;
|
|||
use Drupal\Component\Utility\Crypt;
|
||||
|
||||
/**
|
||||
* Defines a discovery mechanism to find annotated plugins in PSR-0 namespaces.
|
||||
* Defines a discovery mechanism to find annotated plugins in PSR-4 namespaces.
|
||||
*/
|
||||
class AnnotatedClassDiscovery implements DiscoveryInterface {
|
||||
|
||||
|
@ -114,7 +114,7 @@ class AnnotatedClassDiscovery implements DiscoveryInterface {
|
|||
// Register the namespaces of classes that can be used for annotations.
|
||||
AnnotationRegistry::registerLoader('class_exists');
|
||||
|
||||
// Search for classes within all PSR-0 namespace locations.
|
||||
// Search for classes within all PSR-4 namespace locations.
|
||||
foreach ($this->getPluginNamespaces() as $namespace => $dirs) {
|
||||
foreach ($dirs as $dir) {
|
||||
if (file_exists($dir)) {
|
||||
|
@ -180,7 +180,7 @@ class AnnotatedClassDiscovery implements DiscoveryInterface {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets an array of PSR-0 namespaces to search for plugin classes.
|
||||
* Gets an array of PSR-4 namespaces to search for plugin classes.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
|
|
|
@ -6,7 +6,7 @@ use Drupal\Component\Annotation\AnnotationInterface;
|
|||
use Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery as ComponentAnnotatedClassDiscovery;
|
||||
|
||||
/**
|
||||
* Defines a discovery mechanism to find annotated plugins in PSR-0 namespaces.
|
||||
* Defines a discovery mechanism to find annotated plugins in PSR-4 namespaces.
|
||||
*/
|
||||
class AnnotatedClassDiscovery extends ComponentAnnotatedClassDiscovery {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
The core/lib directory is for classes provided by Drupal Core that are original
|
||||
to Drupal. All Drupal-originated code must follow the PSR-0 naming convention
|
||||
to Drupal. All Drupal-originated code must follow the PSR-4 naming convention
|
||||
for classes and namespaces as documented here:
|
||||
|
||||
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
|
||||
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md
|
||||
|
||||
The vendor namespace for Drupal-originated code is "Drupal".
|
||||
|
|
|
@ -81,7 +81,7 @@ class AnnotatedClassDiscoveryAutomatedProviders extends AnnotatedClassDiscovery
|
|||
// Register the namespaces of classes that can be used for annotations.
|
||||
AnnotationRegistry::registerLoader('class_exists');
|
||||
|
||||
// Search for classes within all PSR-0 namespace locations.
|
||||
// Search for classes within all PSR-4 namespace locations.
|
||||
foreach ($this->getPluginNamespaces() as $namespace => $dirs) {
|
||||
foreach ($dirs as $dir) {
|
||||
if (file_exists($dir)) {
|
||||
|
|
|
@ -568,7 +568,7 @@ function simpletest_log_read($test_id, $database_prefix, $test_class) {
|
|||
* Gets a list of all of the tests provided by the system.
|
||||
*
|
||||
* The list of test classes is loaded by searching the designated directory for
|
||||
* each module for files matching the PSR-0 standard. Once loaded the test list
|
||||
* each module for files matching the PSR-4 standard. Once loaded the test list
|
||||
* is cached and stored in a static variable.
|
||||
*
|
||||
* @param string $extension
|
||||
|
|
|
@ -1094,7 +1094,7 @@ function simpletest_script_get_test_list() {
|
|||
// Extract test case class names from specified directory.
|
||||
// Find all tests in the PSR-X structure; Drupal\$extension\Tests\*.php
|
||||
// Since we do not want to hard-code too many structural file/directory
|
||||
// assumptions about PSR-0/4 files and directories, we check for the
|
||||
// assumptions about PSR-4 files and directories, we check for the
|
||||
// minimal conditions only; i.e., a '*.php' file that has '/Tests/' in
|
||||
// its path.
|
||||
// Ignore anything from third party vendors.
|
||||
|
|
Loading…
Reference in New Issue