This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor for contao/phpstan namespace * Fix requirements for --prefer-lowest tests * Remove unused dependency * Rename PHPStan to PhpStan
- Loading branch information
Showing
16 changed files
with
98 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,46 @@ | ||
{ | ||
"name": "oneup/phpstan-contao", | ||
"description": "Contao Framework extensions and rules for PHPStan", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "David Greminger", | ||
"homepage": "https://github.com/bytehead" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.1", | ||
"phpstan/phpstan": "^0.10.2", | ||
"phpstan/phpstan-symfony": "^0.10", | ||
"symfony/debug": "^4.1", | ||
"symfony/monolog-bundle": "^3.3", | ||
"symfony/monolog-bridge": "^3.0 || ^4.0", | ||
"symfony/templating": "^3.1 || ^4.0" | ||
}, | ||
"require-dev": { | ||
"contao/core-bundle": "^4.5.999", | ||
"contao/test-case": "^1.1", | ||
"friendsofphp/php-cs-fixer": "^2.12", | ||
"lexik/maintenance-bundle": "^2.1.3", | ||
"php-coveralls/php-coveralls": "^2.1", | ||
"php-http/guzzle6-adapter": "^1.1", | ||
"phpunit/phpunit": "^7.2", | ||
"symfony/var-dumper": "^4.1" | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Oneup\\PHPStan\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Oneup\\PHPStan\\Tests\\": "tests/" | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"support": { | ||
"email": "hello@1up.io", | ||
"issues": "https://github.com/1up-lab/phpstan-contao/issues", | ||
"source": "https://github.com/1up-lab/phpstan-contao" | ||
} | ||
"name": "contao/phpstan", | ||
"description": "Contao Framework extensions and rules for PHPStan", | ||
"license": "LGPL-3.0-or-later", | ||
"authors": [ | ||
{ | ||
"name": "David Greminger", | ||
"homepage": "https://github.com/bytehead" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.1", | ||
"friendsofsymfony/http-cache-bundle": "^2.3", | ||
"phpstan/phpstan": "^0.10.2", | ||
"phpstan/phpstan-symfony": "^0.10", | ||
"symfony/debug": "^4.1", | ||
"symfony/monolog-bridge": "^3.0 || ^4.0", | ||
"symfony/monolog-bundle": "^3.3", | ||
"symfony/templating": "^3.1 || ^4.0" | ||
}, | ||
"require-dev": { | ||
"contao/core-bundle": "^4.5.999", | ||
"contao/test-case": "^1.1", | ||
"friendsofphp/php-cs-fixer": "^2.12", | ||
"lexik/maintenance-bundle": "^2.1.3", | ||
"php-coveralls/php-coveralls": "^2.1", | ||
"php-http/guzzle6-adapter": "^1.1", | ||
"phpunit/phpunit": "^7.2", | ||
"symfony/var-dumper": "^4.1" | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Contao\\PhpStan\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Contao\\PhpStan\\Tests\\": "tests/" | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
services: | ||
- | ||
class: Oneup\PHPStan\Type\Contao\ContainerInterfaceDynamicMethodReturnTypeExtension | ||
class: Contao\PHPStan\Type\Contao\ContainerInterfaceDynamicMethodReturnTypeExtension | ||
tags: | ||
- phpstan.broker.dynamicMethodReturnTypeExtension | ||
- | ||
class: Oneup\PHPStan\Type\Contao\ContainerAwareInterfaceDynamicMethodReturnTypeExtension | ||
class: Contao\PHPStan\Type\Contao\ContainerAwareInterfaceDynamicMethodReturnTypeExtension | ||
tags: | ||
- phpstan.broker.dynamicMethodReturnTypeExtension | ||
|
||
- | ||
class: Oneup\PHPStan\Type\Contao\ContaoFrameworkDynamicMethodReturnTypeExtension | ||
class: Contao\PHPStan\Type\Contao\ContaoFrameworkDynamicMethodReturnTypeExtension | ||
tags: | ||
- phpstan.broker.dynamicMethodReturnTypeExtension | ||
|
||
- | ||
class: Oneup\PHPStan\Type\Contao\ContaoTestCaseDynamicMethodReturnTypeExtension | ||
class: Contao\PHPStan\Type\Contao\ContaoTestCaseDynamicMethodReturnTypeExtension | ||
tags: | ||
- phpstan.broker.dynamicMethodReturnTypeExtension | ||
|
||
- | ||
class: Oneup\PHPStan\Reflection\Contao\BackendTemplateClassReflectionExtension | ||
class: Contao\PHPStan\Reflection\Contao\BackendTemplateClassReflectionExtension | ||
tags: | ||
- phpstan.broker.propertiesClassReflectionExtension | ||
|
||
- Oneup\PHPStan\Contao\ServiceHelper(%contao.services_yml_path%) | ||
- Contao\PHPStan\Contao\ServiceHelper(%contao.services_yml_path%) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Contao\PhpStan\Tests; | ||
|
||
use Contao\PhpStan\ServiceHelper; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class ServiceHelperTest extends TestCase | ||
{ | ||
public function testCanBeInstantiated(): void | ||
{ | ||
$serviceHelper = new ServiceHelper(__DIR__.'/Resources/config/empty_services.yml'); | ||
|
||
$this->assertInstanceOf('Contao\PhpStan\ServiceHelper', $serviceHelper); | ||
} | ||
|
||
public function testEmptyServicesYml(): void | ||
{ | ||
$serviceHelper = new ServiceHelper(__DIR__.'/Resources/config/empty_services.yml'); | ||
|
||
$this->assertNull($serviceHelper->getService('foobar.id')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters