Skip to content

Commit

Permalink
Command not working (#72)
Browse files Browse the repository at this point in the history
* Make CI catch problems when command does not work

* Set `error_reporting`

* Output warnings/errors to `stderr`

* Use php interpreter explicitly

* Configure CI to catch when command exits with failure

* Enforce CI to use Composer v1.x

* Fix command

* Always compile and try to run the phar file

* Build cache and add it to the phar archive

* Add changelog records
  • Loading branch information
borilyordanov authored Dec 15, 2020
1 parent e2ad9ed commit a6a87e3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 36 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ cache:
- $HOME/.composer/cache

before_script:
- composer self-update --1 # Enforce composer v1.x is used
- phpenv config-rm xdebug.ini || true
- travis_retry composer install --no-interaction --prefer-dist

script:
- bin/phpunit
- if [[ "$RELEASE" == "true" ]]; then composer run compile; fi
- bin/raml-code-generator
- composer run compile
- dist/raml-code-generator.phar

deploy:
provider: releases
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 11.2.3
### Fixed
- The compiled `raml-code-generator.phar` command now does not report any errors.

## 11.2.2
### Changed
- Use another encrypted Travis CI token, as encryption is related to the repository.

## 11.2.1
N/A (empty version)

## 11.2.0
### Changed
- Requires at least PHP 7.2, updates used internal libraries.
Expand Down
3 changes: 1 addition & 2 deletions bin/raml-code-generator
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
declare(strict_types=1, ticks=1);

use Paysera\Component\Console\Application;
use Paysera\Component\Console\PharKernel;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;

set_time_limit(0);

require __DIR__ . '/../vendor/autoload.php';

$kernel = new PharKernel('phar', false);
$kernel = new AppKernel('phar', false);
$application = new Application($kernel);
$application->run(new ArgvInput(), new ConsoleOutput());
2 changes: 1 addition & 1 deletion box.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"name": ["*.php", "*.xml", "*.yml", "*.xsd", "*.db", "*.twig"],
"exclude": ["test", "Tests", "tests"],
"in": ["src", "vendor", "app"]
"in": ["src", "vendor", "app", "var/cache"]
}
],
"blacklist": [
Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@
"symfony/phpunit-bridge": "^3.0"
},
"scripts": {
"compile": "box compile",
"compile": [
"bin/console cache:warmup --no-debug --env phar",
"box compile"
],
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache"
Expand Down
31 changes: 0 additions & 31 deletions src/Paysera/Component/Console/PharKernel.php

This file was deleted.

0 comments on commit a6a87e3

Please sign in to comment.