├── .travis.yml
├── Command
├── BaseCommand.php
├── CheckDistCommand.php
├── CheckSrcCommand.php
├── RemoveDistCommand.php
└── RemoveSrcCommand.php
├── LICENSE
├── README.md
├── bin
└── composer-checker
├── box.json
├── composer.json
└── test
├── composer.json
└── composer.lock
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 |
3 | php:
4 | - 5.3
5 | - 5.4
6 | - 5.5
7 | - 5.6
8 | - hhvm
9 |
10 | before_script:
11 | - composer self-update || true
12 | - composer install
13 | - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then curl -LSs http://box-project.org/installer.php | php; fi;'
14 | - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php box.phar -v build; fi;'
15 |
16 | script:
17 | # Check Script.
18 | #-- check:dist
19 | - php bin/composer-checker check:dist -p github test/composer.lock | grep "Invalid urls found"
20 | - php bin/composer-checker check:dist -p github -p "jquery.com" test/composer.lock | grep "Invalid urls found"
21 | - php bin/composer-checker check:dist -p github -p "jquery.com" --allow-empty test/composer.lock | grep "All urls valid"
22 | #--- check:src
23 | - php bin/composer-checker check:src -p github test/composer.lock | grep "Invalid urls found"
24 | - php bin/composer-checker check:src -p github -p "jquery.com" test/composer.lock | grep "Invalid urls found"
25 | - php bin/composer-checker check:src -p github -p "jquery.com" -p "googlecode.com" --allow-empty test/composer.lock | grep "All urls valid"
26 | #--- remove:src
27 | - cp -f test/composer.lock test.lock; grep '"source":' test.lock
28 | - cp -f test/composer.lock test.lock; php bin/composer-checker remove:src test.lock && ! grep -q '"source":' test.lock
29 | - cp -f test/composer.lock test.lock; php bin/composer-checker remove:src -e googlecode.com test.lock && grep -q '"source":' test.lock
30 | #--- remove:dist
31 | - cp -f test/composer.lock test.lock; grep '"dist":' test.lock
32 | - cp -f test/composer.lock test.lock; php bin/composer-checker remove:dist test.lock && ! grep -q '"dist":' test.lock
33 | - cp -f test/composer.lock test.lock; php bin/composer-checker remove:dist -e jquery.com test.lock && grep -q '"dist":' test.lock
34 | # Check PHAR.
35 | - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php composer-checker.phar check:dist -p github test/composer.lock | grep "Invalid urls found"; fi;'
--------------------------------------------------------------------------------
/Command/BaseCommand.php:
--------------------------------------------------------------------------------
1 | input = $input;
30 | $this->output = $output;
31 | }
32 |
33 | /**
34 | * Verbose output helper.
35 | *
36 | * @param $message
37 | * @param $level
38 | */
39 | protected function verbose($message, $level)
40 | {
41 | if ($this->output->getVerbosity() >= $level) {
42 | $this->output->write($message);
43 | }
44 | }
45 |
46 | protected function printTable($rows, $title = ' --- Invalid urls found --- ', array $headers = array('Package', 'Src-URL'))
47 | {
48 | /** @var \Symfony\Component\Console\Helper\TableHelper $table */
49 | $table = $this->getApplication()->getHelperSet()->get('table');
50 | $table->setHeaders($headers)->setRows($rows);
51 |
52 | $this->output->writeln(''.$title.'');
53 | $table->render($this->output);
54 | }
55 |
56 | /**
57 | * Will return true, if the given url matches at least one of the given patterns.
58 | *
59 | * @param $url
60 | * @param array $patterns
61 | * @return bool
62 | */
63 | protected function doesUrlMatchToAtLeastOnePattern($url, array $patterns)
64 | {
65 | foreach ($patterns as $pattern) {
66 | $regex = '|' . $pattern . '|';
67 | $this->verbose(
68 | "Checking url '" . $url . "' with regex '" . $regex . "' -> ",
69 | OutputInterface::VERBOSITY_VERBOSE
70 | );
71 | if (preg_match($regex, $url)) {
72 | $this->verbose("MATCHED\n", OutputInterface::VERBOSITY_VERBOSE);
73 | return true;
74 | } else {
75 | $this->verbose("NOT matched\n", OutputInterface::VERBOSITY_VERBOSE);
76 | }
77 | }
78 | return false;
79 | }
80 |
81 | protected function readJsonFromFile($path)
82 | {
83 | $content = @file_get_contents($path);
84 | if (!$content) {
85 | throw new \Exception("File not found or empty.");
86 | }
87 |
88 | $json = @json_decode($content);
89 | if (!is_object($json) || json_last_error() != JSON_ERROR_NONE) {
90 | throw new \Exception("Invalid JSON in file.");
91 | }
92 |
93 | return $json;
94 | }
95 |
96 | protected function updateJsonContentInFile($path, \stdClass $content)
97 | {
98 | array_unshift($content->_readme, '------------------------------------------------------------------');
99 | array_unshift($content->_readme, 'ATTENTION: This file has been changed by silpion/composer-checker.');
100 | array_unshift($content->_readme, '------------------------------------------------------------------');
101 |
102 | // Write new content to same file
103 | $jsonPretty = new JsonPretty();
104 | file_put_contents($path, $jsonPretty->prettify($content));
105 |
106 | $this->output->writeln('Updated file.');
107 | }
108 | }
--------------------------------------------------------------------------------
/Command/CheckDistCommand.php:
--------------------------------------------------------------------------------
1 |
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 Silpion\ComposerChecker\Command;
13 |
14 | use Symfony\Component\Console\Command\Command;
15 | use Symfony\Component\Console\Input\InputArgument;
16 | use Symfony\Component\Console\Input\InputInterface;
17 | use Symfony\Component\Console\Input\InputOption;
18 | use Symfony\Component\Console\Output\OutputInterface;
19 |
20 | /**
21 | * Command for checking the dist urls.
22 | *
23 | * @author Julius Beckmann
24 | */
25 | class CheckDistCommand extends BaseCommand
26 | {
27 | protected function configure()
28 | {
29 | $this
30 | ->setName('check:dist')
31 | ->setDescription('Matching the dist urls in a composer.lock file against some patterns.')
32 | ->addArgument('file', InputArgument::REQUIRED, 'composer.lock file to check')
33 | ->addOption(
34 | 'url-pattern',
35 | 'p',
36 | InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED,
37 | 'Regex-Patterns for dist-urls.'
38 | )
39 | ->addOption('allow-empty', null, InputOption::VALUE_NONE, 'Will allow empty dist urls.');
40 | }
41 |
42 | protected function execute(InputInterface $input, OutputInterface $output)
43 | {
44 | parent::execute($input, $output);
45 |
46 | $patterns = $input->getOption('url-pattern');
47 | if (!$patterns) {
48 | $output->writeln('Need at least one url-pattern.');
49 |
50 | return 1;
51 | }
52 |
53 | if($input->getOption('allow-empty')) {
54 | $patterns[] = '^$';
55 | }
56 |
57 | try {
58 | $json = $this->readJsonFromFile($input->getArgument('file'));
59 | }catch(\Exception $e) {
60 | $output->writeln(''.$e->getMessage().'');
61 | return 1;
62 | }
63 |
64 | $errors = $this->searchUrlPatterns($json, $patterns, $output);
65 | if ($errors) {
66 | $rows = array();
67 | foreach ($errors as $package => $url) {
68 | $rows[] = array($package, $url);
69 | }
70 |
71 | $this->printTable($rows);
72 |
73 | return 1;
74 | }
75 |
76 | $output->writeln('All urls valid.');
77 | }
78 |
79 | /**
80 | * Will return a array of invalid packages and their urls determined by the given patterns.
81 | * A url is invalid if NONE of the given patterns has matched.
82 | *
83 | * @param \stdClass $json
84 | * @param array $patterns
85 | * @return array
86 | */
87 | protected function searchUrlPatterns(\stdClass $json, array $patterns)
88 | {
89 | $errors = array();
90 | foreach ($json->packages as $package) {
91 | if (!isset($package->dist)) {
92 | $this->verbose('Dist not found in "' . $package->name . "\"\n", OutputInterface::VERBOSITY_VERBOSE);
93 | $url = '';
94 | }else{
95 | $url = $package->dist->url;
96 | }
97 |
98 | if (!$this->doesUrlMatchToAtLeastOnePattern($url, $patterns)) {
99 | $errors[$package->name] = $url;
100 | }
101 | }
102 |
103 | return $errors;
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/Command/CheckSrcCommand.php:
--------------------------------------------------------------------------------
1 |
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 Silpion\ComposerChecker\Command;
13 |
14 | use Symfony\Component\Console\Command\Command;
15 | use Symfony\Component\Console\Input\InputArgument;
16 | use Symfony\Component\Console\Input\InputInterface;
17 | use Symfony\Component\Console\Input\InputOption;
18 | use Symfony\Component\Console\Output\OutputInterface;
19 |
20 | /**
21 | * Command for checking the src urls.
22 | *
23 | * @author Julius Beckmann
24 | */
25 | class CheckSrcCommand extends BaseCommand
26 | {
27 | protected function configure()
28 | {
29 | $this
30 | ->setName('check:src')
31 | ->setDescription('Matching the src urls in a composer.lock file against some patterns.')
32 | ->addArgument('file', InputArgument::REQUIRED, 'composer.lock file to check')
33 | ->addOption(
34 | 'url-pattern',
35 | 'p',
36 | InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED,
37 | 'Regex-Patterns for src-urls.'
38 | )
39 | ->addOption('allow-empty', null, InputOption::VALUE_NONE, 'Will allow empty src urls.');
40 | }
41 |
42 | protected function execute(InputInterface $input, OutputInterface $output)
43 | {
44 | parent::execute($input, $output);
45 |
46 | $patterns = $input->getOption('url-pattern');
47 | if (!$patterns) {
48 | $output->writeln('Need at least one url-pattern.');
49 |
50 | return 1;
51 | }
52 |
53 | if($input->getOption('allow-empty')) {
54 | $patterns[] = '^$';
55 | }
56 |
57 | try {
58 | $json = $this->readJsonFromFile($input->getArgument('file'));
59 | }catch(\Exception $e) {
60 | $output->writeln(''.$e->getMessage().'');
61 | return 1;
62 | }
63 |
64 | $errors = $this->searchUrlPatterns($json, $patterns, $output);
65 | if ($errors) {
66 | $rows = array();
67 | foreach ($errors as $package => $url) {
68 | $rows[] = array($package, $url);
69 | }
70 |
71 | $this->printTable($rows);
72 |
73 | return 1;
74 | }
75 |
76 | $output->writeln('All urls valid.');
77 | }
78 |
79 | /**
80 | * Will return a array of invalid packages and their urls determined by the given patterns.
81 | * A url is invalid if NONE of the given patterns has matched.
82 | *
83 | * @param \stdClass $json
84 | * @param array $patterns
85 | * @return array
86 | */
87 | protected function searchUrlPatterns(\stdClass $json, array $patterns)
88 | {
89 | $errors = array();
90 | foreach ($json->packages as $package) {
91 | if (!isset($package->source)) {
92 | $this->verbose('Source not found in "' . $package->name . "\"\n", OutputInterface::VERBOSITY_VERBOSE);
93 | $url = '';
94 | }else{
95 | $url = $package->source->url;
96 | }
97 |
98 | if (!$this->doesUrlMatchToAtLeastOnePattern($url, $patterns)) {
99 | $errors[$package->name] = $url;
100 | }
101 | }
102 |
103 | return $errors;
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/Command/RemoveDistCommand.php:
--------------------------------------------------------------------------------
1 |
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 Silpion\ComposerChecker\Command;
13 |
14 | use Symfony\Component\Console\Input\InputArgument;
15 | use Symfony\Component\Console\Input\InputInterface;
16 | use Symfony\Component\Console\Input\InputOption;
17 | use Symfony\Component\Console\Output\OutputInterface;
18 |
19 | /**
20 | * Command for removing dist urls from a composer.lock file.
21 | *
22 | * @author Julius Beckmann
23 | */
24 | class RemoveDistCommand extends BaseCommand
25 | {
26 | protected function configure()
27 | {
28 | $this
29 | ->setName('remove:dist')
30 | ->setDescription('Removing dist urls from a composer.lock file.')
31 | ->addArgument('file', InputArgument::REQUIRED, 'composer.lock file to check')
32 | ->addOption(
33 | 'except',
34 | 'e',
35 | InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED,
36 | 'Patterns for dist-urls that will not be removed.'
37 | );
38 | }
39 |
40 | protected function execute(InputInterface $input, OutputInterface $output)
41 | {
42 | parent::execute($input, $output);
43 |
44 | try {
45 | $json = $this->readJsonFromFile($input->getArgument('file'));
46 | }catch(\Exception $e) {
47 | $output->writeln(''.$e->getMessage().'');
48 | return 1;
49 | }
50 |
51 | $newContent = $this->removeDistUrls($json, $input->getOption('except'));
52 |
53 | $this->updateJsonContentInFile($input->getArgument('file'), $newContent);
54 | }
55 |
56 | private function removeDistUrls($json, $exceptPatterns)
57 | {
58 | foreach($json->packages as $key => $package) {
59 |
60 | if(isset($package->dist)) {
61 | if(!$this->doesUrlMatchToAtLeastOnePattern($package->dist->url, $exceptPatterns)) {
62 | unset($package->dist);
63 | }
64 | }else{
65 | $this->verbose(
66 | 'No Dist found for package '.$package->name,
67 | OutputInterface::VERBOSITY_VERBOSE
68 | );
69 | }
70 |
71 | $json->packages[$key] = $package;
72 | }
73 |
74 | return $json;
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/Command/RemoveSrcCommand.php:
--------------------------------------------------------------------------------
1 |
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 Silpion\ComposerChecker\Command;
13 |
14 | use Symfony\Component\Console\Input\InputArgument;
15 | use Symfony\Component\Console\Input\InputInterface;
16 | use Symfony\Component\Console\Input\InputOption;
17 | use Symfony\Component\Console\Output\OutputInterface;
18 |
19 | /**
20 | * Command for removing src urls from a composer.lock file.
21 | *
22 | * @author Julius Beckmann
23 | */
24 | class RemoveSrcCommand extends BaseCommand
25 | {
26 | protected function configure()
27 | {
28 | $this
29 | ->setName('remove:src')
30 | ->setDescription('Removing src urls from a composer.lock file.')
31 | ->addArgument('file', InputArgument::REQUIRED, 'composer.lock file to check')
32 | ->addOption(
33 | 'except',
34 | 'e',
35 | InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED,
36 | 'Patterns for src-urls that will not be removed.'
37 | );
38 | }
39 |
40 | protected function execute(InputInterface $input, OutputInterface $output)
41 | {
42 | parent::execute($input, $output);
43 |
44 | try {
45 | $json = $this->readJsonFromFile($input->getArgument('file'));
46 | }catch(\Exception $e) {
47 | $output->writeln(''.$e->getMessage().'');
48 | return 1;
49 | }
50 |
51 | $newContent = $this->removeSrcUrls($json, $input->getOption('except'));
52 |
53 | $this->updateJsonContentInFile($input->getArgument('file'), $newContent);
54 | }
55 |
56 | private function removeSrcUrls($json, $exceptPatterns)
57 | {
58 | foreach ($json->packages as $key => $package) {
59 |
60 | if (isset($package->source)) {
61 | if (!$this->doesUrlMatchToAtLeastOnePattern($package->source->url, $exceptPatterns)) {
62 | unset($package->source);
63 | }
64 | }else{
65 | $this->verbose(
66 | 'No Source found for package '.$package->name,
67 | OutputInterface::VERBOSITY_VERBOSE
68 | );
69 | }
70 |
71 | $json->packages[$key] = $package;
72 | }
73 |
74 | return $json;
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright (c) 2013 Silpion IT-Solutions GmbH
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is furnished
10 | to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://travis-ci.org/silpion/composer-checker)
2 |
3 | Composer Checker
4 | ======================
5 |
6 | A simple tool for various composer related checks and validations.
7 |
8 | Usage
9 | -----
10 |
11 | $ php bin/composer-checker
12 |
13 | Available commands:
14 | help Displays help for a command
15 | list Lists commands
16 | check
17 | check:dist Matching the dist urls in a composer.lock file against some patterns.
18 | check:src Matching the src urls in a composer.lock file against some patterns.
19 | remove
20 | remove:dist Removing dist urls from a composer.lock file.
21 | remove:src Removing src urls from a composer.lock file.
22 |
23 |
24 | Check: Dist-Urls
25 | -------------------
26 |
27 | This check is intended to validate the dist-urls in a composer.lock file.
28 | When using a Satis Mirror for your packages, it might break your ci/deployment when external dist-urls are used in your composer.lock file.
29 |
30 | Simply run this command to check against the url "satis.example.com":
31 |
32 | $ php bin/composer-checker check:dist -p "satis.example.com" composer.lock
33 | --- Invalid urls found ---
34 | +-----------------+-----------------------------------------------------------------------------------------------+
35 | | Package | Dist-URL |
36 | +-----------------+-----------------------------------------------------------------------------------------------+
37 | | symfony/console | https://api.github.com/repos/symfony/Console/zipball/00848d3e13cf512e77c7498c2b3b0192f61f4b18 |
38 | +-----------------+-----------------------------------------------------------------------------------------------+
39 |
40 | The output gives a hint, which packages do not comply with the given url pattern, which is basically just a regex.
41 | A positive example with a more complex regex:
42 |
43 | $ php bin/composer-checker check:dist -p "^https://api.github.com/repos/(.+)/(.+)/zipball/([a-f0-9]+)$" composer.lock
44 | All urls valid.
45 |
46 | It is also possible to enforce to use only "https" dist-urls with a pattern like this:
47 |
48 | $ php bin/composer-checker check:dist -p "^https://" composer.lock
49 |
50 | Allowing empty or missing dist urls can be done with the `--allow-empty` switch.
51 |
52 |
53 | Check: Source-Urls
54 | ---------------------
55 |
56 | Parallel to the dist urls, the source urls can be checked too.
57 |
58 | $ php bin/composer-checker check:src -p "git@git.example.com/foo.git" composer.lock
59 |
60 |
61 | Allowing empty or missing source urls can be done with the `--allow-empty` switch.
62 |
63 |
64 | Remove: Dist-Urls
65 | -------------------
66 |
67 | This command will remove distribution urls from a given `composer.lock` file.
68 | Forcing composer to install all packages from "source".
69 |
70 | It is possible to `--except` specific patterns like "jquery.com". These urls will _not_ be removed.
71 |
72 | php bin/composer-checker remove:dist -e jquery.com composer.lock
73 |
74 |
75 | Remove: Source-Urls
76 | -------------------
77 |
78 | Working the same as the `remove:dist` counterpart. Removing the "source" entries from a given `composer.lock` file.
79 |
80 | php bin/composer-checker remove:src -e jquery.com composer.lock
81 |
82 | This command can be very useful for automated deploying.
83 | Because if a package mirror like Satis, holding "dist" copies, is not available, composer will silently fail back to using "source" packages creating a unnoticed dependency between production and the VCS.
84 | Removing all the "source" entries from a composer.lock file, will force composer to only use the "dist" urls or stop with a failure.
85 |
86 |
87 | LICENSE
88 | -------
89 |
90 | The license can be found here: [LICENSE](LICENSE)
91 |
--------------------------------------------------------------------------------
/bin/composer-checker:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 |
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 | require_once call_user_func(function() {
14 | if (is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) {
15 | return $autoloadFile;
16 | }
17 |
18 | if (is_file($autoloadFile = __DIR__.'/../../../autoload.php')) {
19 | return $autoloadFile;
20 | }
21 |
22 | if (is_file($autoloadFile = __DIR__.'/../../../../../autoload.php')) {
23 | return $autoloadFile;
24 | }
25 |
26 | echo 'Could not find autoload.php. Did you forget to run "composer install --dev"?'.PHP_EOL;
27 | exit(1);
28 | });
29 |
30 | use Silpion\ComposerChecker\Command\CheckDistCommand;
31 | use Silpion\ComposerChecker\Command\CheckSrcCommand;
32 | use Silpion\ComposerChecker\Command\RemoveDistCommand;
33 | use Silpion\ComposerChecker\Command\RemoveSrcCommand;
34 | use Symfony\Component\Console\Application;
35 |
36 | $application = new Application();
37 | $application->setName('Composer Checker');
38 | $application->setVersion('0.1');
39 | $application->add(new CheckDistCommand());
40 | $application->add(new CheckSrcCommand());
41 | $application->add(new RemoveDistCommand());
42 | $application->add(new RemoveSrcCommand());
43 | $application->run();
44 |
--------------------------------------------------------------------------------
/box.json:
--------------------------------------------------------------------------------
1 | {
2 | "chmod": "0755",
3 | "directories": [
4 | "."
5 | ],
6 | "files": [
7 | "bin/composer-checker"
8 | ],
9 | "replacements": {
10 | "revision": "HEAD"
11 | },
12 | "map": [
13 | { "Command" : "Silpion/ComposerChecker/Command" }
14 | ],
15 | "main": "bin/composer-checker",
16 | "output": "composer-checker.phar",
17 | "stub": true
18 | }
19 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "silpion/composer-checker",
3 | "description": "Tool for checking composer configurations.",
4 | "keywords": ["composer", "check", "config", "dependencies"],
5 | "license": "MIT",
6 | "authors": [
7 | {
8 | "name": "Julius Beckmann",
9 | "email": "beckmann@silpion.de"
10 | }
11 | ],
12 | "bin": ["bin/composer-checker"],
13 | "require": {
14 | "symfony/console": "~2.0",
15 | "camspiers/json-pretty": "~1.0"
16 | },
17 | "autoload": {
18 | "psr-0": {
19 | "Silpion\\ComposerChecker": ""
20 | }
21 | },
22 | "target-dir": "Silpion/ComposerChecker"
23 | }
24 |
--------------------------------------------------------------------------------
/test/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "require": {
3 | "symfony/console": "*",
4 | "smarty/smarty": "*",
5 | "javascript/jquery": "*"
6 | },
7 | "repositories": [
8 | {
9 | "type": "package",
10 | "package": {
11 | "name": "smarty/smarty",
12 | "version": "3.1.7",
13 | "source": {
14 | "url": "http://smarty-php.googlecode.com/svn/",
15 | "type": "svn",
16 | "reference": "tags/Smarty_3_1_7/distribution/"
17 | },
18 | "autoload": {
19 | "classmap": ["libs/"]
20 | }
21 | }
22 | },
23 | {
24 | "type": "package",
25 | "package": {
26 | "name": "javascript/jquery",
27 | "version": "1.7.2",
28 | "dist": {
29 | "url": "http://code.jquery.com/jquery-1.7.2.js",
30 | "type": "file"
31 | }
32 | }
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/test/composer.lock:
--------------------------------------------------------------------------------
1 | {
2 | "_readme": [
3 | "This file locks the dependencies of your project to a known state",
4 | "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5 | "This file is @generated automatically"
6 | ],
7 | "hash": "3f1c7ec3d5d7c6db42821ff15b497b4d",
8 | "packages": [
9 | {
10 | "name": "javascript/jquery",
11 | "version": "1.7.2",
12 | "dist": {
13 | "type": "file",
14 | "url": "http://code.jquery.com/jquery-1.7.2.js",
15 | "reference": null,
16 | "shasum": null
17 | },
18 | "type": "library"
19 | },
20 | {
21 | "name": "smarty/smarty",
22 | "version": "v3.1.18",
23 | "source": {
24 | "type": "svn",
25 | "url": "http://smarty-php.googlecode.com/svn",
26 | "reference": "/tags/v3.1.18/@4839"
27 | },
28 | "require": {
29 | "php": ">=5.2"
30 | },
31 | "type": "library",
32 | "autoload": {
33 | "classmap": [
34 | "distribution/libs/Smarty.class.php",
35 | "distribution/libs/SmartyBC.class.php",
36 | "distribution/libs/sysplugins/smarty_security.php"
37 | ]
38 | },
39 | "notification-url": "https://packagist.org/downloads/",
40 | "license": [
41 | "LGPL-3.0"
42 | ],
43 | "authors": [
44 | {
45 | "name": "Monte Ohrt",
46 | "email": "monte@ohrt.com"
47 | },
48 | {
49 | "name": "Uwe Tews",
50 | "email": "uwe.tews@googlemail.com"
51 | },
52 | {
53 | "name": "Rodney Rehm",
54 | "email": "rodney.rehm@medialize.de"
55 | }
56 | ],
57 | "description": "Smarty - the compiling PHP template engine",
58 | "homepage": "http://www.smarty.net",
59 | "keywords": [
60 | "templating"
61 | ],
62 | "time": "2014-05-08 18:38:30"
63 | },
64 | {
65 | "name": "symfony/console",
66 | "version": "v2.5.0",
67 | "target-dir": "Symfony/Component/Console",
68 | "source": {
69 | "type": "git",
70 | "url": "https://github.com/symfony/Console.git",
71 | "reference": "ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c"
72 | },
73 | "dist": {
74 | "type": "zip",
75 | "url": "https://api.github.com/repos/symfony/Console/zipball/ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c",
76 | "reference": "ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c",
77 | "shasum": ""
78 | },
79 | "require": {
80 | "php": ">=5.3.3"
81 | },
82 | "require-dev": {
83 | "psr/log": "~1.0",
84 | "symfony/event-dispatcher": "~2.1"
85 | },
86 | "suggest": {
87 | "psr/log": "For using the console logger",
88 | "symfony/event-dispatcher": ""
89 | },
90 | "type": "library",
91 | "extra": {
92 | "branch-alias": {
93 | "dev-master": "2.5-dev"
94 | }
95 | },
96 | "autoload": {
97 | "psr-0": {
98 | "Symfony\\Component\\Console\\": ""
99 | }
100 | },
101 | "notification-url": "https://packagist.org/downloads/",
102 | "license": [
103 | "MIT"
104 | ],
105 | "authors": [
106 | {
107 | "name": "Fabien Potencier",
108 | "email": "fabien@symfony.com",
109 | "homepage": "http://fabien.potencier.org",
110 | "role": "Lead Developer"
111 | },
112 | {
113 | "name": "Symfony Community",
114 | "homepage": "http://symfony.com/contributors"
115 | }
116 | ],
117 | "description": "Symfony Console Component",
118 | "homepage": "http://symfony.com",
119 | "time": "2014-05-22 08:54:24"
120 | }
121 | ],
122 | "packages-dev": [
123 |
124 | ],
125 | "aliases": [
126 |
127 | ],
128 | "minimum-stability": "stable",
129 | "stability-flags": [
130 |
131 | ],
132 | "platform": [
133 |
134 | ],
135 | "platform-dev": [
136 |
137 | ]
138 | }
139 |
--------------------------------------------------------------------------------