Skip to content

Commit 97083c2

Browse files
committed
deprecate the SensioLabs namespace in favor of a new Qossmic namespace
1 parent 11c651e commit 97083c2

File tree

100 files changed

+1438
-165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1438
-165
lines changed

.github/workflows/ci.yaml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
- name: 'Run PhpStan'
8484
run: 'vendor/bin/phpstan analyze --no-progress'
8585

86-
unit-tests:
86+
tests:
8787
name: 'PHPUnit'
8888

8989
runs-on: 'ubuntu-latest'
@@ -139,4 +139,47 @@ jobs:
139139
run: 'vendor/bin/simple-phpunit install'
140140

141141
- name: 'Run tests'
142-
run: 'vendor/bin/simple-phpunit'
142+
run: |
143+
vendor/bin/simple-phpunit --testsuite="unit tests"
144+
vendor/bin/simple-phpunit --testsuite="integration tests"
145+
146+
legacy-api-tests:
147+
name: 'Deprecated legacy API'
148+
149+
runs-on: 'ubuntu-latest'
150+
151+
strategy:
152+
matrix:
153+
php-version: ['7.4']
154+
155+
steps:
156+
- name: 'Check out'
157+
uses: 'actions/checkout@v2'
158+
159+
- name: 'Set up PHP'
160+
uses: 'shivammathur/setup-php@v2'
161+
with:
162+
php-version: '${{ matrix.php-version }}'
163+
coverage: 'none'
164+
165+
- name: 'Get Composer cache directory'
166+
id: 'composer-cache'
167+
run: 'echo "::set-output name=cache-dir::$(composer config cache-files-dir)"'
168+
169+
- name: 'Cache dependencies'
170+
uses: 'actions/cache@v2'
171+
with:
172+
path: '${{ steps.composer-cache.outputs.cache-dir }}'
173+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
174+
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-'
175+
176+
- name: 'Install dependencies'
177+
run: |
178+
composer update --no-progress --prefer-stable
179+
180+
- name: 'Install PHPUnit'
181+
run: 'vendor/bin/simple-phpunit install'
182+
183+
- name: 'Run tests'
184+
run: |
185+
vendor/bin/simple-phpunit --testsuite="legacy API"

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
CHANGELOG
22
=========
33

4+
0.8.0
5+
-----
6+
7+
* Deprecated the `SensioLabs` namespace, use the equivalent classes from the `Qossmic` namespace
8+
instead.
9+
410
0.7.1
511
-----
612

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"symfony/form": "^4.4||^5.0",
2323
"symfony/framework-bundle": "^4.4||^5.0",
2424
"symfony/http-kernel": "^4.4||^5.0",
25+
"symfony/deprecation-contracts": "^2.1",
2526
"symfony/options-resolver": "^4.4||^5.0",
2627
"symfony/property-access": "^4.4||^5.0"
2728
},
@@ -37,17 +38,18 @@
3738
},
3839
"autoload": {
3940
"psr-4": {
40-
"SensioLabs\\RichModelForms\\": "src"
41+
"Qossmic\\RichModelForms\\": "src/Qossmic",
42+
"SensioLabs\\RichModelForms\\": "src/Legacy"
4143
}
4244
},
4345
"autoload-dev": {
4446
"psr-4": {
45-
"SensioLabs\\RichModelForms\\Tests\\": "tests"
47+
"Qossmic\\RichModelForms\\Tests\\": "tests"
4648
}
4749
},
4850
"extra": {
4951
"branch-alias": {
50-
"dev-main": "0.7-dev"
52+
"dev-main": "0.8-dev"
5153
}
5254
}
5355
}

phpstan-baseline.neon

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,97 @@
11
parameters:
2+
ignoreErrors:
3+
-
4+
message: "#^If condition is always false\\.$#"
5+
count: 1
6+
path: src/Legacy/DataMapper/DataMapper.php
7+
8+
-
9+
message: "#^If condition is always false\\.$#"
10+
count: 1
11+
path: src/Legacy/DataMapper/PropertyMapperInterface.php
12+
13+
-
14+
message: "#^If condition is always false\\.$#"
15+
count: 1
16+
path: src/Legacy/DataTransformer/ValueObjectTransformer.php
17+
18+
-
19+
message: "#^If condition is always false\\.$#"
20+
count: 1
21+
path: src/Legacy/DependencyInjection/Compiler/RegisterExceptionHandlersPass.php
22+
23+
-
24+
message: "#^If condition is always false\\.$#"
25+
count: 1
26+
path: src/Legacy/DependencyInjection/RichModelFormsExtension.php
27+
28+
-
29+
message: "#^If condition is always false\\.$#"
30+
count: 1
31+
path: src/Legacy/ExceptionHandling/ArgumentTypeMismatchExceptionHandler.php
32+
33+
-
34+
message: "#^If condition is always false\\.$#"
35+
count: 1
36+
path: src/Legacy/ExceptionHandling/ChainExceptionHandler.php
37+
38+
-
39+
message: "#^If condition is always false\\.$#"
40+
count: 1
41+
path: src/Legacy/ExceptionHandling/Error.php
42+
43+
-
44+
message: "#^If condition is always false\\.$#"
45+
count: 1
46+
path: src/Legacy/ExceptionHandling/ExceptionHandlerInterface.php
47+
48+
-
49+
message: "#^If condition is always false\\.$#"
50+
count: 1
51+
path: src/Legacy/ExceptionHandling/ExceptionHandlerRegistry.php
52+
53+
-
54+
message: "#^If condition is always false\\.$#"
55+
count: 1
56+
path: src/Legacy/ExceptionHandling/ExceptionToErrorMapperTrait.php
57+
58+
-
59+
message: "#^If condition is always false\\.$#"
60+
count: 1
61+
path: src/Legacy/ExceptionHandling/FallbackExceptionHandler.php
62+
63+
-
64+
message: "#^If condition is always false\\.$#"
65+
count: 1
66+
path: src/Legacy/ExceptionHandling/FormExceptionHandler.php
67+
68+
-
69+
message: "#^If condition is always false\\.$#"
70+
count: 1
71+
path: src/Legacy/ExceptionHandling/GenericExceptionHandler.php
72+
73+
-
74+
message: "#^If condition is always false\\.$#"
75+
count: 1
76+
path: src/Legacy/Extension/RichModelFormsTypeExtension.php
77+
78+
-
79+
message: "#^If condition is always false\\.$#"
80+
count: 1
81+
path: src/Legacy/Instantiator/FormDataInstantiator.php
82+
83+
-
84+
message: "#^If condition is always false\\.$#"
85+
count: 1
86+
path: src/Legacy/Instantiator/ObjectInstantiator.php
87+
88+
-
89+
message: "#^If condition is always false\\.$#"
90+
count: 1
91+
path: src/Legacy/Instantiator/ViewDataInstantiator.php
92+
93+
-
94+
message: "#^If condition is always false\\.$#"
95+
count: 1
96+
path: src/Legacy/RichModelFormsBundle.php
97+

phpunit.xml.dist

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
bootstrap="vendor/autoload.php"
66
>
77
<testsuites>
8-
<testsuite name="RichModelFormsBundle test suite">
9-
<directory>./tests</directory>
8+
<testsuite name="legacy API">
9+
<directory>./tests/Legacy</directory>
10+
</testsuite>
11+
<testsuite name="integration tests">
12+
<directory>./tests/Integration</directory>
13+
</testsuite>
14+
<testsuite name="unit tests">
15+
<directory>./tests/Unit</directory>
1016
</testsuite>
1117
</testsuites>
1218

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the RichModelFormsBundle package.
5+
*
6+
* (c) Christian Flothmann <[email protected]>
7+
* (c) Christopher Hertel <[email protected]>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
12+
13+
declare(strict_types = 1);
14+
15+
namespace SensioLabs\RichModelForms\DataMapper;
16+
17+
trigger_deprecation('sensiolabs-de/rich-model-forms-bundle', '0.8', sprintf('The "%s\DataMapper" class is deprecated. Use "%s" instead.', __NAMESPACE__, \Qossmic\RichModelForms\DataMapper\DataMapper::class));
18+
19+
class_alias(\Qossmic\RichModelForms\DataMapper\DataMapper::class, __NAMESPACE__.'\DataMapper');
20+
21+
if (false) {
22+
class DataMapper extends \Qossmic\RichModelForms\DataMapper\DataMapper
23+
{
24+
}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the RichModelFormsBundle package.
5+
*
6+
* (c) Christian Flothmann <[email protected]>
7+
* (c) Christopher Hertel <[email protected]>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
12+
13+
declare(strict_types = 1);
14+
15+
namespace SensioLabs\RichModelForms\DataMapper;
16+
17+
trigger_deprecation('sensiolabs-de/rich-model-forms-bundle', '0.8', sprintf('The "%s\PropertyMapperInterface" is deprecated. Use "%s" instead.', __NAMESPACE__, \Qossmic\RichModelForms\DataMapper\PropertyMapperInterface::class));
18+
19+
class_alias(\Qossmic\RichModelForms\DataMapper\PropertyMapperInterface::class, __NAMESPACE__.'\PropertyMapperInterface');
20+
21+
if (false) {
22+
interface PropertyMapperInterface extends \Qossmic\RichModelForms\DataMapper\PropertyMapperInterface
23+
{
24+
}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the RichModelFormsBundle package.
5+
*
6+
* (c) Christian Flothmann <[email protected]>
7+
* (c) Christopher Hertel <[email protected]>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
12+
13+
declare(strict_types = 1);
14+
15+
namespace SensioLabs\RichModelForms\DataTransformer;
16+
17+
trigger_deprecation('sensiolabs-de/rich-model-forms-bundle', '0.8', sprintf('The "%s\ValueObjectTransformer" class is deprecated. Use "%s" instead.', __NAMESPACE__, \Qossmic\RichModelForms\DataTransformer\ValueObjectTransformer::class));
18+
19+
class_alias(\Qossmic\RichModelForms\DataTransformer\ValueObjectTransformer::class, __NAMESPACE__.'\ValueObjectTransformer');
20+
21+
if (false) {
22+
class ValueObjectTransformer extends \Qossmic\RichModelForms\DataTransformer\ValueObjectTransformer
23+
{
24+
}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the RichModelFormsBundle package.
5+
*
6+
* (c) Christian Flothmann <[email protected]>
7+
* (c) Christopher Hertel <[email protected]>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
12+
13+
declare(strict_types = 1);
14+
15+
namespace SensioLabs\RichModelForms\DependencyInjection\Compiler;
16+
17+
trigger_deprecation('sensiolabs-de/rich-model-forms-bundle', '0.8', sprintf('The "%s\RegisterExceptionHandlersPass" class is deprecated. Use "%s" instead.', __NAMESPACE__, \Qossmic\RichModelForms\DependencyInjection\Compiler\RegisterExceptionHandlersPass::class));
18+
19+
class_alias(\Qossmic\RichModelForms\DependencyInjection\Compiler\RegisterExceptionHandlersPass::class, __NAMESPACE__.'\RegisterExceptionHandlersPass');
20+
21+
if (false) {
22+
class RegisterExceptionHandlersPass extends \Qossmic\RichModelForms\DependencyInjection\Compiler\RegisterExceptionHandlersPass
23+
{
24+
}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the RichModelFormsBundle package.
5+
*
6+
* (c) Christian Flothmann <[email protected]>
7+
* (c) Christopher Hertel <[email protected]>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
12+
13+
declare(strict_types = 1);
14+
15+
namespace SensioLabs\RichModelForms\DependencyInjection;
16+
17+
trigger_deprecation('sensiolabs-de/rich-model-forms-bundle', '0.8', sprintf('The "%s\RichModelFormsExtension" class is deprecated. Use "%s" instead.', __NAMESPACE__, \Qossmic\RichModelForms\DependencyInjection\RichModelFormsExtension::class));
18+
19+
class_alias(\Qossmic\RichModelForms\DependencyInjection\RichModelFormsExtension::class, __NAMESPACE__.'\RichModelFormsExtension');
20+
21+
if (false) {
22+
class RichModelFormsExtension extends \Qossmic\RichModelForms\DependencyInjection\RichModelFormsExtension
23+
{
24+
}
25+
}

0 commit comments

Comments
 (0)