Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Commit message for this issue:
Issue #1992950 by xjm, Pancho: Stop use-ing Exception.
Our coding standards state that we should not use
classes in the global namespace, but I noticed today this is still all over the place for the Exception class. See http://drupal.org/node/1353118 and #1614186: Coding standards for using "native" PHP classes like stdClass in namespaced code.
Attached corrects this.
[tesla:drupal | Sun 07:19:25] $ grep -rl "use Exception" *
core/lib/Drupal/Component/Archiver/ArchiverException.php
core/lib/Drupal/Component/Archiver/ArchiveTar.php
core/lib/Drupal/Component/Plugin/Exception/ContextException.php
core/lib/Drupal/Component/Plugin/Exception/PluginException.php
core/lib/Drupal/Core/Config/DatabaseStorage.php
core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php
core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
core/lib/Drupal/Core/Database/Driver/sqlite/Install/Tasks.php
core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php
core/lib/Drupal/Core/Database/Install/Tasks.php
core/lib/Drupal/Core/Database/Query/Insert.php
core/lib/Drupal/Core/Entity/EntityMalformedException.php
core/lib/Drupal/Core/Entity/EntityStorageException.php
core/lib/Drupal/Core/Executable/ExecutableException.php
core/lib/Drupal/Core/TypedData/MissingContextException.php
core/lib/Drupal/Core/TypedData/ReadOnlyException.php
core/lib/Drupal/Core/Updater/UpdaterException.php
core/lib/Drupal/Core/Utility/UpdateException.php
core/modules/field/lib/Drupal/field/Tests/CrudTest.php
core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Tests/FieldSqlStorageTest.php
core/modules/locale/lib/Drupal/locale/Gettext.php
core/modules/locale/lib/Drupal/locale/StringStorageException.php
core/modules/node/lib/Drupal/node/Tests/NodeCreationTest.php
core/modules/node/lib/Drupal/node/Tests/NodeQueryAlterTest.php
core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
core/modules/system/lib/Drupal/system/Tests/Database/InvalidDataTest.php
core/modules/system/lib/Drupal/system/Tests/Database/SchemaTest.php
core/modules/system/lib/Drupal/system/Tests/Database/TransactionTest.php
core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php
core/modules/system/lib/Drupal/system/Tests/Plugin/AlterDecoratorTest.php
core/modules/system/lib/Drupal/system/Tests/Plugin/FactoryTest.php
core/modules/system/lib/Drupal/system/Tests/Routing/RouteProviderTest.php
core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php
Comment | File | Size | Author |
---|---|---|---|
un-use-exception.patch | 32.04 KB | xjm | |
Comments
Comment #1
xjmMarked #1993370: Fully qualify \Exception instead of "use"ing it as a duplicate.
Comment #2
aspilicious CreditAttribution: aspilicious commentedWe need to do the same for PDO and SplFileInfo
Comment #3
xjmYeah, let's get those next in other sub-issues for #1614186: Coding standards for using "native" PHP classes like stdClass in namespaced code.
Comment #4
catchCommitted/pushed to 8.x, thanks!
Comment #5.0
(not verified) CreditAttribution: commentedUpdated issue summary.