Skip to content

Commit db42777

Browse files
authored
Merge pull request #596 from greg0ire/soft-final
Mark classes as final with an annotation
2 parents e858ce0 + 25b672a commit db42777

7 files changed

+16
-2
lines changed

UPGRADE.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Upgrade
22

3+
## Upgrade to 3.5
4+
5+
## Final classes
6+
7+
Some classes have been marked as `@final` because they are not supposed to be
8+
extended. They will be `final`, and most of them will be marked with
9+
`@internal` in 4.0.0.
10+
311
## From 2.x to 3.0.0
412

513
- The configuration for the migration namespace and directory changed as follows:
@@ -79,8 +87,8 @@ doctrine_migrations:
7987
### Underlying doctrine/migrations library
8088

8189
Upgrading this bundle to `3.0` will also update the `doctrine/migrations` library to the version `3.0`.
82-
Backward incompatible changes in `doctrine/migrations` 3.0
83-
are documented in the dedicated [UPGRADE](https://github.com/doctrine/migrations/blob/3.0.x/UPGRADE.md) document.
90+
Backward incompatible changes in `doctrine/migrations` 3.0
91+
are documented in the dedicated [UPGRADE](https://github.com/doctrine/migrations/blob/3.0.x/UPGRADE.md) document.
8492

8593
- The container is not automatically injected anymore when a migration implements `ContainerAwareInterface`. Custom
8694
migration factories should be used to inject additional dependencies into migrations.

src/Collector/MigrationsCollector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use function count;
1717
use function get_class;
1818

19+
/** @final */
1920
class MigrationsCollector extends DataCollector
2021
{
2122
/** @var DependencyFactory */

src/Collector/MigrationsFlattener.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use function array_map;
1515

16+
/** @final */
1617
class MigrationsFlattener
1718
{
1819
/**

src/DependencyInjection/CompilerPass/ConfigureDependencyFactoryPass.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use function is_string;
2020
use function sprintf;
2121

22+
/** @final */
2223
class ConfigureDependencyFactoryPass implements CompilerPassInterface
2324
{
2425
public function process(ContainerBuilder $container): void

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use function strtoupper;
2020
use function substr;
2121

22+
/** @final */
2223
class Configuration implements ConfigurationInterface
2324
{
2425
public function getConfigTreeBuilder(): TreeBuilder

src/DependencyInjection/DoctrineMigrationsExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use function strlen;
3131
use function substr;
3232

33+
/** @final */
3334
class DoctrineMigrationsExtension extends Extension
3435
{
3536
/**

src/DoctrineMigrationsBundle.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use function dirname;
1212

13+
/** @final */
1314
class DoctrineMigrationsBundle extends Bundle
1415
{
1516
/** @return void */

0 commit comments

Comments
 (0)