Persistent Flashdata with Redis in Laravel - session

I'm using Redis as session driver in Laravel 4.2 stable.
Ever since this morning, after I've got a composer update, the flashdata in sessions are not self-destroying. They are persistent. But if I switch from redis to file session driver, they are working as they should.
These are the updated packages:
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing symfony/finder (v2.5.3)
- Installing symfony/finder (v2.5.4)
Downloading: 100%
- Removing symfony/translation (v2.5.3)
- Installing symfony/translation (v2.5.4)
Downloading: 100%
- Removing symfony/security-core (v2.5.3)
- Installing symfony/security-core (v2.5.4)
Downloading: 100%
- Removing symfony/routing (v2.5.3)
- Installing symfony/routing (v2.5.4)
Downloading: 100%
- Removing symfony/process (v2.5.3)
- Installing symfony/process (v2.5.4)
Downloading: 100%
- Removing symfony/http-foundation (v2.5.3)
- Installing symfony/http-foundation (v2.5.4)
Downloading: 100%
- Removing symfony/event-dispatcher (v2.5.3)
- Installing symfony/event-dispatcher (v2.5.4)
Loading from cache
- Removing symfony/debug (v2.5.3)
- Installing symfony/debug (v2.5.4)
Loading from cache
- Removing symfony/http-kernel (v2.5.3)
- Installing symfony/http-kernel (v2.5.4)
Downloading: 100%
- Removing symfony/dom-crawler (v2.5.3)
- Installing symfony/dom-crawler (v2.5.4)
Downloading: 100%
- Removing symfony/css-selector (v2.5.3)
- Installing symfony/css-selector (v2.5.4)
Downloading: 100%
- Removing symfony/console (v2.5.3)
- Installing symfony/console (v2.5.4)
Downloading: 100%
- Removing symfony/browser-kit (v2.5.3)
- Installing symfony/browser-kit (v2.5.4)
Loading from cache
- Removing nesbot/carbon (1.11.0)
- Installing nesbot/carbon (1.12.0)
Downloading: 100%
- Removing symfony/filesystem (v2.5.3)
- Installing symfony/filesystem (v2.5.4)
Downloading: 100%
- Removing barryvdh/laravel-debugbar (v1.6.8)
- Installing barryvdh/laravel-debugbar (v1.7.5)
Downloading: 100%
- Removing guzzlehttp/guzzle (4.2.1)
- Installing guzzlehttp/guzzle (4.2.2)
Downloading: 100%
- Removing symfony/class-loader (v2.5.3)
- Installing symfony/class-loader (v2.5.4)
Downloading: 100%
- Removing bkwld/croppa (dev-master 6882599)
- Installing bkwld/croppa (dev-master f38d935)
Downloading: 100%
- Removing way/generators (dev-master 5edee3a)
- Installing way/generators (dev-master 27a8d2e)
Downloading: 100%
Writing lock file
Generating autoload files
Generating optimized class loader
Everything was working okay until the last composer update.
Have anyone else have experienced this? If so, how can I fix this?
Note: changing the cache and session driver to file works as it should, but I need redis.
Thanks in advance,

Just as a reference, It's fixed after a composer update days after. It was possibly a symfony component bug.

Related

Error trying to connect symfony 5 app with redis on heroku

I am facing an issue when trying to connect a symfony 5 application with a redis server on heroku.
- My composer.json and composer.lock have the ext-redis:"*" setted.
"require": {
"php": "~7.4.0",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-intl": "*",
"ext-openssl": "*",
"ext-redis": "*",
...
}
I have 3 config vars on heroku:
Default var created after heroku redis module activation
REDIS_URL = redis://h:someHash#ec2.eu-west-1.compute.amazonaws.com:27269
Custom var to fit php class Redis constructor
REDIS_HOST = redis://h:someHash#ec2.eu-west-1.compute.amazonaws.com
REDIS_PORT = 27269
My deploy stops on the error: Unable to find the socket transport "redis" - did you forget to enable it when you configured PHP?
The deploy full logs:
-----> PHP app detected
-----> Bootstrapping...
-----> Installing platform packages...
- php (7.4.6)
- ext-intl (bundled with php)
- ext-redis (5.2.2)
- apache (2.4.43)
- nginx (1.18.0)
-----> Installing dependencies...
Composer version 1.10.6 2020-05-06 10:28:10
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 108 installs, 0 updates, 0 removals
- Installing ocramius/package-versions (1.8.0): Loading from cache
- Installing symfony/flex (v1.6.3): Loading from cache
- Installing symfony/polyfill-mbstring (v1.17.0): Loading from cache
- Installing mtdowling/jmespath.php (2.5.0): Loading from cache
- Installing ralouphie/getallheaders (3.0.3): Loading from cache
- Installing psr/http-message (1.0.1): Loading from cache
- Installing guzzlehttp/psr7 (1.6.1): Loading from cache
- Installing guzzlehttp/promises (v1.3.1): Loading from cache
- Installing symfony/polyfill-intl-idn (v1.17.0): Loading from cache
- Installing guzzlehttp/guzzle (6.5.3): Loading from cache
- Installing aws/aws-sdk-php (3.138.0): Loading from cache
- Installing doctrine/cache (1.10.0): Loading from cache
- Installing doctrine/collections (1.6.4): Loading from cache
- Installing doctrine/inflector (1.4.1): Loading from cache
- Installing doctrine/instantiator (1.3.0): Loading from cache
- Installing doctrine/lexer (1.2.0): Loading from cache
- Installing psr/container (1.0.0): Loading from cache
- Installing symfony/service-contracts (v2.0.1): Loading from cache
- Installing symfony/stopwatch (v5.0.8): Loading from cache
- Installing symfony/polyfill-php73 (v1.17.0): Loading from cache
- Installing symfony/console (v5.0.8): Loading from cache
- Installing webimpress/safe-writer (2.0.1): Loading from cache
- Installing laminas/laminas-zendframework-bridge (1.0.3): Loading from cache
- Installing laminas/laminas-eventmanager (3.2.1): Loading from cache
- Installing laminas/laminas-code (3.4.1): Loading from cache
- Installing ocramius/proxy-manager (2.8.0): Loading from cache
- Installing doctrine/event-manager (1.1.0): Loading from cache
- Installing doctrine/dbal (2.10.2): Loading from cache
- Installing doctrine/migrations (2.2.1): Loading from cache
- Installing doctrine/annotations (1.10.2): Loading from cache
- Installing doctrine/reflection (1.2.1): Loading from cache
- Installing twig/twig (v3.0.3): Loading from cache
- Installing symfony/translation-contracts (v2.0.1): Loading from cache
- Installing symfony/validator (v5.0.8): Loading from cache
- Installing symfony/twig-bridge (v5.0.8): Loading from cache
- Installing symfony/mime (v5.0.8): Loading from cache
- Installing symfony/http-foundation (v5.0.8): Loading from cache
- Installing psr/event-dispatcher (1.0.0): Loading from cache
- Installing symfony/event-dispatcher-contracts (v2.0.1): Loading from cache
- Installing symfony/event-dispatcher (v5.0.8): Loading from cache
- Installing symfony/var-dumper (v5.0.8): Loading from cache
- Installing psr/log (1.1.3): Loading from cache
- Installing symfony/error-handler (v5.0.8): Loading from cache
- Installing symfony/http-kernel (v5.0.8): Loading from cache
- Installing symfony/filesystem (v5.0.8): Loading from cache
- Installing symfony/config (v5.0.8): Loading from cache
- Installing symfony/twig-bundle (v5.0.8): Loading from cache
- Installing symfony/translation (v5.0.8): Loading from cache
- Installing symfony/security-core (v5.0.8): Loading from cache
- Installing symfony/inflector (v5.0.8): Loading from cache
- Installing symfony/property-access (v5.0.8): Loading from cache
- Installing symfony/security-http (v5.0.8): Loading from cache
- Installing symfony/security-guard (v5.0.8): Loading from cache
- Installing symfony/security-csrf (v5.0.8): Loading from cache
- Installing symfony/dependency-injection (v5.0.8): Loading from cache
- Installing symfony/security-bundle (v5.0.8): Loading from cache
- Installing symfony/routing (v5.0.8): Loading from cache
- Installing symfony/finder (v5.0.8): Loading from cache
- Installing symfony/var-exporter (v5.0.8): Loading from cache
- Installing psr/cache (1.0.1): Loading from cache
- Installing symfony/cache-contracts (v2.0.1): Loading from cache
- Installing symfony/cache (v5.0.8): Loading from cache
- Installing symfony/framework-bundle (v5.0.8): Loading from cache
- Installing symfony/options-resolver (v5.0.8): Loading from cache
- Installing symfony/intl (v5.0.8): Loading from cache
- Installing symfony/polyfill-intl-icu (v1.17.0): Loading from cache
- Installing symfony/form (v5.0.8): Loading from cache
- Installing symfony/expression-language (v5.0.8): Loading from cache
- Installing doctrine/persistence (1.3.7): Loading from cache
- Installing symfony/doctrine-bridge (v5.0.8): Loading from cache
- Installing symfony/asset (v5.0.8): Loading from cache
- Installing pagerfanta/pagerfanta (v2.1.3): Loading from cache
- Installing doctrine/common (2.12.0): Loading from cache
- Installing doctrine/orm (v2.7.2): Loading from cache
- Installing jdorn/sql-formatter (v1.2.17): Loading from cache
- Installing doctrine/doctrine-bundle (2.0.8): Loading from cache
- Installing easycorp/easyadmin-bundle (v2.3.8): Loading from cache
- Installing behat/transliterator (v1.3.0): Loading from cache
- Installing gedmo/doctrine-extensions (v2.4.41): Loading from cache
- Installing symfony/process (v5.0.8): Loading from cache
- Installing matleo/bank-statement-parser (dev-master 88ebc8e): Loading from cache
- Installing phpdocumentor/reflection-common (2.1.0): Loading from cache
- Installing phpdocumentor/type-resolver (1.1.0): Loading from cache
- Installing sensio/framework-extra-bundle (v5.5.5): Loading from cache
- Installing symfony/dotenv (v5.0.8): Loading from cache
- Installing symfony/http-client-contracts (v2.0.1): Loading from cache
- Installing symfony/http-client (v5.0.8): Loading from cache
- Installing egulias/email-validator (2.1.17): Loading from cache
- Installing symfony/mailer (v5.0.8): Loading from cache
- Installing monolog/monolog (2.0.2): Loading from cache
- Installing symfony/monolog-bridge (v5.0.8): Loading from cache
- Installing symfony/monolog-bundle (v3.5.0): Loading from cache
- Installing symfony/notifier (v5.0.8): Loading from cache
- Installing doctrine/doctrine-migrations-bundle (2.1.2): Loading from cache
- Installing symfony/orm-pack (v1.0.8): Loading from cache
- Installing symfony/serializer (v5.0.8): Loading from cache
- Installing symfony/property-info (v5.0.8): Loading from cache
- Installing webmozart/assert (1.8.0): Loading from cache
- Installing phpdocumentor/reflection-docblock (5.1.0): Loading from cache
- Installing symfony/serializer-pack (v1.0.3): Loading from cache
- Installing symfony/polyfill-intl-normalizer (v1.17.0): Loading from cache
- Installing symfony/polyfill-intl-grapheme (v1.17.0): Loading from cache
- Installing symfony/string (v5.0.8): Loading from cache
- Installing twig/extra-bundle (v3.0.3): Loading from cache
- Installing symfony/twig-pack (v1.0.0): Loading from cache
- Installing psr/link (1.0.0): Loading from cache
- Installing symfony/web-link (v5.0.8): Loading from cache
- Installing symfony/yaml (v5.0.8): Loading from cache
Generating optimized autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
62 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 1
!!
!! In App_KernelProdContainer.php line 3884:
!!
!! Unable to find the socket transport "redis" - did you forget to enable it w
!! hen you configured PHP?
!!
!!
!!
Script #auto-scripts was called via post-install-cmd
! ERROR: Dependency installation failed!
!
! The 'composer install' process failed with an error. The cause
! may be the download or installation of packages, or a pre- or
! post-install hook (e.g. a 'post-install-cmd' item in 'scripts')
! in your 'composer.json'.
!
! Typical error cases are out-of-date or missing parts of code,
! timeouts when making external connections, or memory limits.
!
! Check the above error output closely to determine the cause of
! the problem, ensure the code you're pushing is functioning
! properly, and that all local changes are committed correctly.
!
! For more information on builds for PHP on Heroku, refer to
! https://devcenter.heroku.com/articles/php-support
! Push rejected, failed to compile PHP app.
! Push failed
Do i miss a extension ?
All you need is to instantiate \Redis object correctly. Based on Redis URL you provided it should be like this (code for phpredis extension):
$redis = new \Redis();
$redis->connect('ec2.eu-west-1.compute.amazonaws.com', 27269);
$redis->auth('someHash');
The tricky part here is that you don't need a username 't' from Redis URL provided by Heroku.

incomplete dependencies in laravel

When i created a project using composer
C:\xampp\htdocs>composer create-project laravel/laravel tipar 5.4.*
Installing laravel/laravel (v5.4.30)
- Installing laravel/laravel (v5.4.30): Loading from cache
Created project in tipar
php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 59 installs, 0 updates, 0 removals
- Installing symfony/css-selector (v3.3.9): Loading from cache
- Installing tijsverkoyen/css-to-inline-styles (2.2.0): Loading from cache
- Installing symfony/polyfill-mbstring (v1.5.0): Loading from cache
- Installing symfony/var-dumper (v3.3.9): Loading from cache
- Installing jakub-onderka/php-console-color (0.1): Loading from cache
- Installing jakub-onderka/php-console-highlighter (v0.3.2): Loading from cache
- Installing dnoegel/php-xdg-base-dir (0.1): Loading from cache
- Installing nikic/php-parser (v3.1.1): Loading from cache
- Installing psr/log (1.0.2): Loading from cache
- Installing symfony/debug (v3.3.9): Downloading (100%)
- Installing symfony/console (v3.3.9): Downloading (100%)
- Installing psy/psysh (v0.8.11): Loading from cache
- Installing vlucas/phpdotenv (v2.4.0): Loading from cache
- Installing symfony/routing (v3.3.9): Loading from cache
- Installing symfony/process (v3.3.9): Loading from cache
- Installing symfony/http-foundation (v3.3.9): Downloading (100%)
this is the only output i get, there are some files that are missing.

doctrine/dbal not getting installed in Heroku

I am running a Laravel project on Heroku. For running a migration that will change the type of a column I need the doctrine/dbal package installed. I put "doctrine/dbal": "^2.5" line in composer.json in the "require" object.
When I pushed the changes to Heroku it is showing the line.
- Installing doctrine/dbal (v2.5.5)
Downloading: 100%
Right after that when I ran heroku run composer show doctrine/dbal it is showing.
[InvalidArgumentException]
Package doctrine/dbal not found
I also ran heroku run composer update several times after that. Here is the full log of my commands.
C:\xampp\htdocs\jem\red-arrow (master) (red-arrow#0.0.1)
λ heroku run composer update
Running composer update on red-arrow... up, run.9733 (Free)
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing symfony/polyfill-mbstring (v1.2.0)
- Installing symfony/polyfill-mbstring (v1.3.0)
Downloading: 100%
- Removing symfony/var-dumper (v3.1.4)
- Installing symfony/var-dumper (v3.1.8)
Downloading: 100%
- Removing symfony/translation (v3.1.4)
- Installing symfony/translation (v3.1.8)
Downloading: 100%
- Removing symfony/routing (v3.1.4)
- Installing symfony/routing (v3.1.8)
Downloading: 100%
- Removing symfony/process (v3.1.4)
- Installing symfony/process (v3.1.8)
Downloading: 100%
- Removing symfony/http-foundation (v3.1.4)
- Installing symfony/http-foundation (v3.1.8)
Downloading: 100%
- Removing symfony/event-dispatcher (v3.1.4)
- Installing symfony/event-dispatcher (v3.2.1)
Downloading: 100%
- Removing psr/log (1.0.0)
- Installing psr/log (1.0.2)
Downloading: 100%
- Removing symfony/debug (v3.1.4)
- Installing symfony/debug (v3.1.8)
Downloading: 100%
- Removing symfony/http-kernel (v3.1.4)
- Installing symfony/http-kernel (v3.1.8)
Downloading: 100%
- Removing symfony/finder (v3.1.4)
- Installing symfony/finder (v3.1.8)
Downloading: 100%
- Removing symfony/console (v3.1.4)
- Installing symfony/console (v3.1.8)
Downloading: 100%
- Removing swiftmailer/swiftmailer (v5.4.3)
- Installing swiftmailer/swiftmailer (v5.4.4)
Downloading: 100%
- Removing paragonie/random_compat (v2.0.2)
- Installing paragonie/random_compat (v2.0.4)
Downloading: 100%
- Removing ramsey/uuid (3.5.0)
- Installing ramsey/uuid (3.5.2)
Downloading: 100%
- Removing nikic/php-parser (v2.1.1)
- Installing nikic/php-parser (v3.0.2)
Downloading: 100%
- Removing psy/psysh (v0.7.2)
- Installing psy/psysh (v0.8.0)
Downloading: 100%
- Removing monolog/monolog (1.21.0)
- Installing monolog/monolog (1.22.0)
Downloading: 100%
- Removing league/flysystem (1.0.27)
- Installing league/flysystem (1.0.32)
Downloading: 100%
- Removing symfony/polyfill-util (v1.2.0)
- Installing symfony/polyfill-util (v1.3.0)
Downloading: 100%
- Removing symfony/polyfill-php56 (v1.2.0)
- Installing symfony/polyfill-php56 (v1.3.0)
Downloading: 100%
- Removing jeremeamia/superclosure (2.2.0)
- Installing jeremeamia/superclosure (2.3.0)
Downloading: 100%
- Removing classpreloader/classpreloader (3.0.0)
- Installing classpreloader/classpreloader (3.1.0)
Downloading: 100%
- Removing laravel/framework (v5.3.9)
- Installing laravel/framework (v5.3.28)
Downloading: 100%
- Installing doctrine/lexer (v1.0.1)
Downloading: 100%
- Installing doctrine/collections (v1.3.0)
Downloading: 100%
- Installing doctrine/cache (v1.6.1)
Downloading: 100%
- Installing doctrine/annotations (v1.3.0)
Downloading: 100%
- Installing doctrine/common (v2.6.2)
Downloading: 100%
- Installing doctrine/dbal (v2.5.5)
Downloading: 100%
- Installing fzaninotto/faker (v1.6.0)
Downloading: 100%
- Installing hamcrest/hamcrest-php (v1.2.2)
Downloading: 100%
- Installing mockery/mockery (0.9.6)
Downloading: 100%
- Installing symfony/yaml (v3.2.1)
Downloading: 100%
- Installing sebastian/version (2.0.1)
Downloading: 100%
- Installing sebastian/resource-operations (1.0.0)
Downloading: 100%
- Installing sebastian/recursion-context (2.0.0)
Downloading: 100%
- Installing sebastian/object-enumerator (2.0.0)
Downloading: 100%
- Installing sebastian/global-state (1.1.1)
Downloading: 100%
- Installing sebastian/exporter (2.0.0)
Downloading: 100%
- Installing sebastian/environment (2.0.0)
Downloading: 100%
- Installing sebastian/diff (1.4.1)
Downloading: 100%
- Installing sebastian/comparator (1.2.2)
Downloading: 100%
- Installing doctrine/instantiator (1.0.5)
Downloading: 100%
- Installing phpunit/php-text-template (1.2.1)
Downloading: 100%
- Installing phpunit/phpunit-mock-objects (3.4.3)
Downloading: 100%
- Installing phpunit/php-timer (1.0.8)
Downloading: 100%
- Installing phpunit/php-file-iterator (1.4.2)
Downloading: 100%
- Installing sebastian/code-unit-reverse-lookup (1.0.0)
Downloading: 100%
- Installing phpunit/php-token-stream (1.4.9)
Downloading: 100%
- Installing phpunit/php-code-coverage (4.0.3)
Downloading: 100%
- Installing webmozart/assert (1.2.0)
Downloading: 100%
- Installing phpdocumentor/reflection-common (1.0)
Downloading: 100%
- Installing phpdocumentor/type-resolver (0.2.1)
Downloading: 100%
- Installing phpdocumentor/reflection-docblock (3.1.1)
Downloading: 100%
- Installing phpspec/prophecy (v1.6.2)
Downloading: 100%
- Installing myclabs/deep-copy (1.5.5)
Downloading: 100%
- Installing phpunit/phpunit (5.7.4)
Downloading: 100%
- Installing symfony/css-selector (v3.1.8)
Downloading: 100%
- Installing symfony/dom-crawler (v3.1.8)
Downloading: 100%
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.4.0)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
phpunit/phpunit suggests installing ext-xdebug (*)
Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Generating optimized class loader
The compiled class file has been removed.
C:\xampp\htdocs\jem\red-arrow (master) (red-arrow#0.0.1)
λ heroku run composer show doctrine/dbal
Running composer show doctrine/dbal on red-arrow... up, run.6084 (Free)
[InvalidArgumentException]
Package doctrine/dbal not found
show [--all] [-i|--installed] [-p|--platform] [-a|--available] [-s|--self] [-N|--name-only] [-P|--path] [-t|--tree] [-l|--latest] [-o|--outdated] [-D|--direct] [--] [<package>] [<version>]
Link to the git repo: https://github.com/Jimut/red-arrow
Link to the Heroku app: http://red-arrow.herokuapp.com/
So, the problem was that the composer.lock wasn't updated before I pushed the repo to Heroku.
Heroku only runs composer install after a git push which reads the lock file to install packages. And as pointed out by Chris in the comments
Don't bother running composer update on Heroku. Any changes you make to the local filesystem after your slug is compiled will be lost as soon as your Dyno cycles.
So the best practice is, after editing composer.json in the local file system always run composer update and then git push.
I moved "doctrine/dbal": "^2.5" from "require-dev" to "require" and didn't run composer update before pushing, that was the cause of the problem.

Deploying Laravel to Heroku - problems with Jeffrey Way's Generators

So, I'm trying do deploy my Laravel project to Heroku.
In my Vendor folder I have Jeffrey Way's Generators installed [/Vendor/Way]. And it seems like Heroku doesn't have it. I get the following whet I run git push heroku master
Initializing repository, done.
Counting objects: 88, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (73/73), done.
Writing objects: 100% (88/88), 34.47 KiB | 0 bytes/s, done.
Total 88 (delta 4), reused 0 (delta 0)
-----> PHP app detected
-----> No runtime requirements in composer.json, defaulting to PHP 5.6.1.
-----> Installing system packages...
- PHP 5.6.1
- Apache 2.4.10
- Nginx 1.6.0
-----> Installing PHP extensions...
- zend-opcache (automatic; bundled, using 'ext-zend-opcache.ini')
-----> Installing dependencies...
Composer version 73e9db5d9952d52a46ecbc20a269a8c5f9c5b011 2014-10-07 15:03:19
Loading composer repositories with package information
Installing dependencies from lock file
- Installing symfony/translation (v2.5.5)
Downloading: 100%
- Installing symfony/security-core (v2.5.5)
Downloading: 100%
- Installing symfony/routing (v2.5.5)
Downloading: 100%
- Installing symfony/process (v2.5.5)
Downloading: 100%
- Installing symfony/http-foundation (v2.5.5)
Downloading: 100%
- Installing symfony/event-dispatcher (v2.5.5)
Downloading: 100%
- Installing symfony/debug (v2.5.5)
Downloading: 100%
- Installing psr/log (1.0.0)
Downloading: 100%
- Installing symfony/http-kernel (v2.5.5)
Downloading: 100%
- Installing symfony/finder (v2.5.5)
Downloading: 100%
- Installing symfony/dom-crawler (v2.5.5)
Downloading: 100%
- Installing symfony/css-selector (v2.5.5)
Downloading: 100%
- Installing symfony/console (v2.5.5)
Downloading: 100%
- Installing symfony/browser-kit (v2.5.5)
Downloading: 100%
- Installing swiftmailer/swiftmailer (v5.3.0)
Downloading: 100%
- Installing stack/builder (v1.0.2)
Downloading: 100%
- Installing predis/predis (v0.8.7)
Downloading: 100%
- Installing phpseclib/phpseclib (0.3.8)
Downloading: 100%
- Installing patchwork/utf8 (v1.1.25)
Downloading: 100%
- Installing nesbot/carbon (1.13.0)
Downloading: 100%
- Installing monolog/monolog (1.11.0)
Downloading: 100%
- Installing nikic/php-parser (v0.9.5)
Downloading: 100%
- Installing jeremeamia/superclosure (1.0.1)
Downloading: 100%
- Installing ircmaxell/password-compat (1.0.3)
Downloading: 100%
- Installing filp/whoops (1.1.2)
Downloading: 100%
- Installing d11wtq/boris (v1.0.8)
Downloading: 100%
- Installing symfony/filesystem (v2.5.5)
Downloading: 100%
- Installing classpreloader/classpreloader (1.0.2)
Downloading: 100%
- Installing laravel/framework (v4.2.11)
Downloading: 100%
Generating optimized autoload files
PHP Fatal error: Class 'Way\Generators\GeneratorsServiceProvider' not found in /tmp/build_5ed58964-00a1-4095-976d-3975a31d73d8/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Way\\Generators\\GeneratorsServiceProvider' not found","file":"\/tmp\/build_5ed58964-00a1-4095-976d-3975a31d73d8\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/ProviderRepository.php","line":157}}Script php artisan clear-compiled handling the post-install-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error: Class 'Way\Generators\GeneratorsServiceProvider' not found in /tmp/build_5ed58964-00a1-4095-976d-3975a31d73d8/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
! Push rejected, failed to compile PHP app
To git#heroku.com:tranquil-shore-5073.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:tranquil-shore-1111.git'
Why does it happens? How can I solve it?
Thanks a lot!
So here is my guide how to do it in Homestead. 1. Open terminal and do $ vagrant ssh 2. Change directory to your project [ex: $ cd Code/webdev.local]3. Run $ composer require way/generators --dev [you can actually skip this step]4. Update your project's composer.json "way/generators" to "dev-master" or "2.*" or "~3.0" - depending on your larval version [ex:
"require-dev": {
"way/generators": "dev-master"
}
]5.Run $composer update 6. Navigate to your project and to app/config/local/app.php (if you don't have local folder - create it and then create app.php which starts like app.php) and set there 'providers'=>array('Way\Generators\GeneratorsServiceProvider'), 7. Run php artisan to check the commands
Worked just fine for me!

Issue with composer install/update

I'm working with a project made with Laravel 4 Framework, then I used this command to install the composer.
composer install
This is the execution result:
$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing psr/log (dev-master 5144da9)
Loading from cache
- Installing doctrine/lexer (dev-master 57d5a02)
Loading from cache
- Installing doctrine/annotations (dev-master 97b4a00)
Loading from cache
- Installing doctrine/collections (dev-master bcb5377)
Loading from cache
- Installing doctrine/cache (dev-master ff36d42)
Loading from cache
- Installing doctrine/inflector (dev-master 8b4b3cc)
Loading from cache
- Installing doctrine/common (dev-master ba2ad8a)
Loading from cache
- Installing symfony/process (2.3.x-dev b09d36a)
Loading from cache
- Installing symfony/finder (2.3.x-dev fc0fbd5)
Loading from cache
- Installing symfony/console (2.3.x-dev f77c13a)
Loading from cache
- Installing symfony/filesystem (dev-master c136348)
Loading from cache
- Installing symfony/routing (2.3.x-dev 7d41463)
Loading from cache
- Installing symfony/debug (2.3.x-dev 93f2633)
Loading from cache
- Installing symfony/event-dispatcher (2.3.x-dev 30b2f95)
Loading from cache
- Installing symfony/http-foundation (2.3.x-dev 8ee2965)
Loading from cache
- Installing symfony/http-kernel (2.3.x-dev e6f1920)
Loading from cache
- Installing kriswallsmith/assetic (v1.1.2)
Loading from cache
- Installing codesleeve/sprockets (dev-master 2d14c76)
Loading from cache
- Installing symfony/dom-crawler (2.3.x-dev 7a72398)
Loading from cache
- Installing swiftmailer/swiftmailer (v5.0.3)
Loading from cache
- Installing predis/predis (0.8.x-dev 09cb667)
Loading from cache
- Installing patchwork/utf8 (v1.1.16)
Loading from cache
- Installing nesbot/carbon (1.7.0)
Loading from cache
- Installing monolog/monolog (dev-master 5ad421d)
Loading from cache
- Installing nikic/php-parser (dev-master 0353c92)
Loading from cache
- Installing jeremeamia/superclosure (1.0.1)
Loading from cache
- Installing ircmaxell/password-compat (1.0.x-dev 1fc1521)
Loading from cache
- Installing classpreloader/classpreloader (1.0.1)
Loading from cache
- Installing symfony/translation (2.3.x-dev 6b255d2)
Loading from cache
- Installing symfony/css-selector (2.3.x-dev 8df20c5)
Loading from cache
- Installing symfony/browser-kit (2.3.x-dev 7149642)
Loading from cache
- Installing filp/whoops (1.0.7)
Loading from cache
- Installing doctrine/dbal (2.4.x-dev ad8608b)
Loading from cache
- Installing laravel/framework (4.0.x-dev 426c9e0)
Loading from cache
- Installing leafo/scssphp (v0.0.7)
Loading from cache
- Installing coffeescript/coffeescript (1.3.1)
Loading from cache
- Installing leafo/lessphp (v0.4.0)
Loading from cache
- Installing nitra/php-min (dev-master f2d5e3f)
Loading from cache
- Installing codesleeve/asset-pipeline (dev-master cad206e)
Loading from cache
- Installing mustache/mustache (v2.4.1)
Loading from cache
- Installing way/generators (dev-master 8390ef9)
Downloading: 100%
- Installing barryvdh/laravel-migration-generator (dev-master 5cd7ec3)
Loading from cache
- Installing dinesh/barcode (dev-master 6cbcffb)
Loading from cache
- Installing symfony/class-loader (dev-master d122b8a)
Loading from cache
- Installing dflydev/markdown (dev-master 6baed9b)
Loading from cache
- Installing phpdocumentor/reflection-docblock (2.0.0)
Loading from cache
- Installing barryvdh/laravel-ide-helper (v1.7.1)
Loading from cache
symfony/routing suggests installing symfony/config ()
symfony/routing suggests installing symfony/yaml ()
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/http-kernel suggests installing symfony/config ()
symfony/http-kernel suggests installing symfony/dependency-injection ()
kriswallsmith/assetic suggests installing twig/twig (Assetic provides the integr
ation with the Twig templating engine)
kriswallsmith/assetic suggests installing ptachoire/cssembed (Assetic provides t
he integration with phpcssembed to embed data uris)
kriswallsmith/assetic suggests installing leafo/scssphp-compass (Assetic provide
s the integration with the SCSS compass plugin)
predis/predis suggests installing ext-phpiredis (Allows faster serialization and
deserialization of the Redis protocol)
patchwork/utf8 suggests installing lib-icu (Use Intl for best performance)
monolog/monolog suggests installing mlehner/gelf-php (Allow sending log messages
to a GrayLog2 server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an A
MQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a M
ongoDB server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages
to a CouchDB server)
monolog/monolog suggests installing raven/raven (Allow sending log messages to a
Sentry server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages
to an Elastic Search server)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages
to AWS services like DynamoDB)
symfony/translation suggests installing symfony/config ()
symfony/translation suggests installing symfony/yaml ()
Writing lock file
Generating autoload files
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","me
ssage":"Class 'Codesleeve\\AssetPipeline\\Filters\\CssRewrite' not found","file"
:"C:\\laravel-projects\\plansherpa\\app\\config\\packages\\codesleeve\\asset-pip
eline\\config.php","line":64}}Script php artisan optimize handling the post-inst
all-cmd event returned with an error
[RuntimeException]
Error Output:
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-p
lugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--ver
bose] [-o|--optimize-autoloader]
On OSX (Mountain Lion) and Windows 7 Home Premium shows me the same error message. How can I fix it now?
Please help me! Thanks in advance.
Seems like a codesleeve issue not laravel / composer.
Have you previously installed codesleeve?
Try removing that line from the app/config/app.php file
Remove codesleeve from composer.json
Run a composer update. Everything should be working now.
Re-add codesleeve to composer.json
Run another composer update
Re-add the codesleeve service provider to app/config/app.php
Run a composer dump-autoload
See how that goes with each step. I'm assuming the problem will still exist but the first 3-4 steps will be good.
Possibly look into upgrading laravel to 4.1 as I think the new codesleeve requires some stuff from this?
tl:dr its looking for Codesleeve\AssetPipeline\Filters\CssRewrite but cant find it.

Resources