Skip to content

Commit e6b23db

Browse files
Added symfony/abstractions: a set of domain specific abstractions
1 parent 3ccbec3 commit e6b23db

Some content is hidden

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

43 files changed

+219
-39
lines changed

.github/build-packages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
$packages[$package->name][$package->version] = $package;
5151

52-
$versions = file_get_contents('https://packagist.org/p/'.$package->name.'.json');
52+
$versions = @file_get_contents('https://packagist.org/p/'.$package->name.'.json') ?: sprintf('{"packages":{"%s":{"dev-master":%s}}}', $package->name, file_get_contents($dir.'/composer.json'));
5353
$versions = json_decode($versions)->packages->{$package->name};
5454

5555
if ($package->version === str_replace('-dev', '.x-dev', $versions->{'dev-master'}->extra->{'branch-alias'}->{'dev-master'})) {

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ before_install:
124124
deps=skip
125125
skip=1
126126
else
127-
COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n')
127+
COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n')
128128
fi
129129
130130
- |
@@ -180,7 +180,7 @@ install:
180180
SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//) &&
181181
git fetch origin $SYMFONY_VERSION &&
182182
git checkout -m FETCH_HEAD &&
183-
COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n')
183+
COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n')
184184
elif [[ ! $skip ]]; then
185185
SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*')
186186
fi

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"symfony/polyfill-php72": "~1.5"
3333
},
3434
"replace": {
35+
"symfony/abstractions": "self.version",
3536
"symfony/asset": "self.version",
3637
"symfony/browser-kit": "self.version",
3738
"symfony/cache": "self.version",
@@ -113,6 +114,7 @@
113114
},
114115
"autoload": {
115116
"psr-4": {
117+
"Symfony\\Abstraction\\": "src/Symfony/Abstraction/",
116118
"Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/",
117119
"Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/",
118120
"Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/",

phpunit.xml.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
<testsuites>
2525
<testsuite name="Symfony Test Suite">
26+
<directory>./src/Symfony/Abstractions/*/Tests/</directory>
2627
<directory>./src/Symfony/Bridge/*/Tests/</directory>
2728
<directory>./src/Symfony/Component/*/Tests/</directory>
2829
<directory>./src/Symfony/Component/*/*/Tests/</directory>
@@ -41,13 +42,15 @@
4142
<whitelist>
4243
<directory>./src/Symfony/</directory>
4344
<exclude>
45+
<directory>./src/Symfony/Abstractions/*/Tests</directory>
4446
<directory>./src/Symfony/Bridge/*/Tests</directory>
4547
<directory>./src/Symfony/Component/*/Tests</directory>
4648
<directory>./src/Symfony/Component/*/*/Tests</directory>
4749
<directory>./src/Symfony/Bundle/*/Tests</directory>
4850
<directory>./src/Symfony/Bundle/*/Resources</directory>
4951
<directory>./src/Symfony/Component/*/Resources</directory>
5052
<directory>./src/Symfony/Component/*/*/Resources</directory>
53+
<directory>./src/Symfony/Abstractions/*/vendor</directory>
5154
<directory>./src/Symfony/Bridge/*/vendor</directory>
5255
<directory>./src/Symfony/Bundle/*/vendor</directory>
5356
<directory>./src/Symfony/Component/*/vendor</directory>

src/Symfony/Abstraction/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
composer.lock
2+
phpunit.xml
3+
vendor/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CHANGELOG
2+
=========
3+
4+
4.2.0
5+
-----
6+
7+
* added `ResettableInterface`

src/Symfony/Abstraction/LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2018 Fabien Potencier
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

src/Symfony/Abstraction/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Symfony Abstractions
2+
====================
3+
4+
A set of domain specific abstractions maintained by the Symfony community.
5+
6+
Resources
7+
---------
8+
9+
* [Documentation](https://symfony.com/doc/current/components/abstractions.html)
10+
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
11+
* [Report issues](https://github.com/symfony/symfony/issues) and
12+
[send Pull Requests](https://github.com/symfony/symfony/pulls)
13+
in the [main Symfony repository](https://github.com/symfony/symfony)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Abstraction;
13+
14+
/**
15+
* Provides a way for objects to be reset to their initial state.
16+
*/
17+
interface ResettableInterface
18+
{
19+
public function reset();
20+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "symfony/abstractions",
3+
"type": "library",
4+
"description": "A set of domain specific abstractions maintained by the Symfony community",
5+
"keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability"],
6+
"homepage": "https://symfony.com",
7+
"license": "MIT",
8+
"authors": [
9+
{
10+
"name": "Nicolas Grekas",
11+
"email": "p@tchwork.com"
12+
},
13+
{
14+
"name": "Symfony Community",
15+
"homepage": "https://symfony.com/contributors"
16+
}
17+
],
18+
"require": {
19+
"php": "^7.1.3"
20+
},
21+
"require-dev": {
22+
"cache/integration-tests": "dev-master"
23+
},
24+
"autoload": {
25+
"psr-4": { "Symfony\\Abstraction\\": "" },
26+
"exclude-from-classmap": [
27+
"**/Tests/"
28+
]
29+
},
30+
"minimum-stability": "dev",
31+
"extra": {
32+
"branch-alias": {
33+
"dev-master": "4.2-dev"
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)