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!
Related
Any help/guidance thank you in advance.
Today I've set up a Heroku dyno, but can't get the vite command to run.
Laravel 9.29, NodeJS 8.15
Trying to run heroku run npm run dev but returns /tmp/dev-3799b748.sh: 1: vite: not found
I've set the build packs to:
heroku buildpacks
=== manage-demo Buildpack URLs
heroku/nodejs
heroku/php
Also the Config Vars NPM_CONFIG_PRODUCTION = false, YARN_PRODUCTION = false
Commands used to create the Laravel Project:
composer create-project laravel/laravel <myprojectname>
composer require laravel/breeze
php artisan breeze:install react
php artisan migrate
npm install
Deploy Branch
-----> Building on the Heroku-22 stack
-----> Using buildpacks:
1. heroku/nodejs
2. heroku/php
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_PRODUCTION=false
NPM_CONFIG_LOGLEVEL=error
USE_NPM_INSTALL=true
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 16.x...
Downloading and installing node 16.17.0...
Using default npm version: 8.15.0
-----> Restoring cache
- node_modules (not cached - skipping)
-----> Installing dependencies
Installing node modules (package.json + package-lock)
added 165 packages, and audited 166 packages in 3s
25 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
-----> Build
Running build
> build
> vite build
vite v3.1.0 building for production...
transforming...
✓ 254 modules transformed.
rendering chunks...
public/build/manifest.json 3.78 KiB
public/build/assets/ConfirmPassword.6778c5aa.js 1.09 KiB / gzip: 0.61 KiB
public/build/assets/InputLabel.b7560c9a.js 0.20 KiB / gzip: 0.18 KiB
public/build/assets/TextInput.90051331.js 0.63 KiB / gzip: 0.39 KiB
public/build/assets/PrimaryButton.63fa2720.js 0.82 KiB / gzip: 0.49 KiB
public/build/assets/ApplicationLogo.4d214c56.js 3.06 KiB / gzip: 1.30 KiB
public/build/assets/ForgotPassword.863d1afc.js 1.06 KiB / gzip: 0.62 KiB
public/build/assets/Login.ffce380f.js 1.94 KiB / gzip: 0.89 KiB
public/build/assets/Register.13d4ee0d.js 1.95 KiB / gzip: 0.76 KiB
public/build/assets/ResetPassword.467e122e.js 1.57 KiB / gzip: 0.65 KiB
public/build/assets/VerifyEmail.800ac39d.js 1.07 KiB / gzip: 0.61 KiB
public/build/assets/Dashboard.c9f20060.js 17.64 KiB / gzip: 6.24 KiB
public/build/assets/Welcome.875c53e4.js 11.94 KiB / gzip: 3.72 KiB
public/build/assets/app.5c62c80a.css 22.06 KiB / gzip: 4.63 KiB
public/build/assets/app.36a55110.js 315.09 KiB / gzip: 107.01 KiB
-----> Caching build
- node_modules
-----> Pruning devDependencies
Skipping because NPM_CONFIG_PRODUCTION is 'false'
-----> Build succeeded!
-----> PHP app detected
-----> Bootstrapping...
-----> Preparing platform package installation...
-----> Installing platform packages...
- php (8.1.10)
- apache (2.4.54)
- composer (2.4.1)
- nginx (1.22.0)
NOTICE: detected userland polyfill packages for PHP extensions
NOTICE: now attempting to install native extension packages
Installing extensions provided by symfony/polyfill-mbstring:
- ext-mbstring...
Installing extensions provided by symfony/polyfill-ctype:
- ext-ctype...
-----> Installing dependencies...
Composer version 2.4.1 2022-08-20 11:44:50
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 70 installs, 0 updates, 0 removals
- Installing doctrine/inflector (2.0.5): Extracting archive
- Installing doctrine/lexer (1.2.3): Extracting archive
- Installing symfony/polyfill-ctype (v1.26.0): Extracting archive
- Installing webmozart/assert (1.11.0): Extracting archive
- Installing dragonmantank/cron-expression (v3.3.2): Extracting archive
- Installing symfony/polyfill-mbstring (v1.26.0): Extracting archive
- Installing symfony/deprecation-contracts (v3.1.1): Extracting archive
- Installing symfony/http-foundation (v6.1.4): Extracting archive
- Installing fruitcake/php-cors (v1.2.0): Extracting archive
- Installing psr/http-message (1.0.1): Extracting archive
- Installing psr/http-client (1.0.1): Extracting archive
- Installing ralouphie/getallheaders (3.0.3): Extracting archive
- Installing psr/http-factory (1.0.1): Extracting archive
- Installing guzzlehttp/psr7 (2.4.1): Extracting archive
- Installing guzzlehttp/promises (1.5.2): Extracting archive
- Installing guzzlehttp/guzzle (7.5.0): Extracting archive
- Installing voku/portable-ascii (2.0.1): Extracting archive
- Installing symfony/polyfill-php80 (v1.26.0): Extracting archive
- Installing phpoption/phpoption (1.9.0): Extracting archive
- Installing graham-campbell/result-type (v1.1.0): Extracting archive
- Installing vlucas/phpdotenv (v5.4.1): Extracting archive
- Installing symfony/css-selector (v6.1.3): Extracting archive
- Installing tijsverkoyen/css-to-inline-styles (2.2.4): Extracting archive
- Installing symfony/var-dumper (v6.1.3): Extracting archive
- Installing symfony/routing (v6.1.3): Extracting archive
- Installing symfony/process (v6.1.3): Extracting archive
- Installing symfony/polyfill-php72 (v1.26.0): Extracting archive
- Installing symfony/polyfill-intl-normalizer (v1.26.0): Extracting archive
- Installing symfony/polyfill-intl-idn (v1.26.0): Extracting archive
- Installing symfony/mime (v6.1.4): Extracting archive
- Installing psr/container (2.0.2): Extracting archive
- Installing symfony/service-contracts (v3.1.1): Extracting archive
- Installing psr/event-dispatcher (1.0.0): Extracting archive
- Installing symfony/event-dispatcher-contracts (v3.1.1): Extracting archive
- Installing symfony/event-dispatcher (v6.1.0): Extracting archive
- Installing psr/log (3.0.0): Extracting archive
- Installing egulias/email-validator (3.2.1): Extracting archive
- Installing symfony/mailer (v6.1.4): Extracting archive
- Installing symfony/error-handler (v6.1.3): Extracting archive
- Installing symfony/http-kernel (v6.1.4): Extracting archive
- Installing symfony/finder (v6.1.3): Extracting archive
- Installing symfony/polyfill-intl-grapheme (v1.26.0): Extracting archive
- Installing symfony/string (v6.1.4): Extracting archive
- Installing symfony/console (v6.1.4): Extracting archive
- Installing symfony/polyfill-php81 (v1.26.0): Extracting archive
- Installing ramsey/collection (1.2.2): Extracting archive
- Installing brick/math (0.10.2): Extracting archive
- Installing ramsey/uuid (4.4.0): Extracting archive
- Installing psr/simple-cache (3.0.0): Extracting archive
- Installing nunomaduro/termwind (v1.14.0): Extracting archive
- Installing symfony/translation-contracts (v3.1.1): Extracting archive
- Installing symfony/translation (v6.1.4): Extracting archive
- Installing nesbot/carbon (2.62.1): Extracting archive
- Installing monolog/monolog (2.8.0): Extracting archive
- Installing league/mime-type-detection (1.11.0): Extracting archive
- Installing league/flysystem (3.3.0): Extracting archive
- Installing nette/utils (v3.2.7): Extracting archive
- Installing nette/schema (v1.2.2): Extracting archive
- Installing dflydev/dot-access-data (v3.0.1): Extracting archive
- Installing league/config (v1.1.1): Extracting archive
- Installing league/commonmark (2.3.5): Extracting archive
- Installing laravel/serializable-closure (v1.2.2): Extracting archive
- Installing laravel/framework (v9.29.0): Extracting archive
- Installing inertiajs/inertia-laravel (v0.6.3): Extracting archive
- Installing laravel/breeze (v1.13.0): Extracting archive
- Installing laravel/sanctum (v2.15.1): Extracting archive
- Installing nikic/php-parser (v4.15.1): Extracting archive
- Installing psy/psysh (v0.11.8): Extracting archive
- Installing laravel/tinker (v2.7.2): Extracting archive
- Installing tightenco/ziggy (v1.4.6): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> #php artisan package:discover --ansi
INFO Discovering packages.
inertiajs/inertia-laravel ............................................. DONE
laravel/breeze ........................................................ DONE
laravel/sanctum ....................................................... DONE
laravel/tinker ........................................................ DONE
nesbot/carbon ......................................................... DONE
nunomaduro/termwind ................................................... DONE
tightenco/ziggy ....................................................... DONE
49 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
-----> Preparing runtime environment...
-----> Checking for additional extensions to install...
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 66M
-----> Launching...
Released v29
https://manage-demo.herokuapp.com/ deployed to Heroku
Starting November 28th, 2022, free Heroku Dynos, free Heroku Postgres, and free Heroku Data for Redis® will no longer be available.
If you have apps using any of these resources, you must upgrade to paid plans by this date to ensure your apps continue to run and to retain your data. For students, we will announce a new program by the end of September. Learn more at https://blog.heroku.com/next-chapter
heroku run npm run dev
npm WARN config production Use `--omit=dev` instead.
> dev
> vite
VITE v3.1.0 ready in 507 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
[..................] | : timing config:load:flatten Completed in 2ms
LARAVEL v9.29.0 plugin v0.6.0
➜ APP_URL: https://manage-demo.herokuapp.com/
node:internal/errors:477 timing config:load:flatten Completed in 2ms
ErrorCaptureStackTrace(err);
^
Error: ENOSPC: System limit for number of file watchers reached, watch '/app/.heroku/node/include/node/openssl/archs/linux-x86_64/asm/include/progs.h'
at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2301:34)
at createFsWatchInstance (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:49738:17)
at setFsWatchListener (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:49785:15)
at NodeFsHandler$1._watchWithNodeFs (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:49940:14)
at NodeFsHandler$1._handleFile (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:50004:23)
at NodeFsHandler$1._addToNodeFs (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:50246:21)
Emitted 'error' event on FSWatcher instance at:
at FSWatcher._handleError (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:51434:10)
at NodeFsHandler$1._addToNodeFs (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:50254:18) {
errno: -28,
syscall: 'watch',
code: 'ENOSPC',
path: '/app/.heroku/node/include/node/openssl/archs/linux-x86_64/asm/include/progs.h',
filename: '/app/.heroku/node/include/node/openssl/archs/linux-x86_64/asm/include/progs.h'
}
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.
I have installed composer as Laravel docs instruct. I then ran the following command to instal Laravel: composer create-project laravel/laravel your-project-name --prefer-dist
I get the following:
The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
https://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Installing laravel/laravel (v5.1.4)
- Installing laravel/laravel (v5.1.4)
Downloading: 100%
Downloading: 100%
Downloading: 100%
Failed to download laravel/laravel from dist: The "https://api.github.com/repos/laravel/laravel/zipball/901a45fd96a7479e77f63ea5f8d1147a2766cafa" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Now trying to download from source
- Installing laravel/laravel (v5.1.4)
Cloning 901a45fd96a7479e77f63ea5f8d1147a2766cafa
Created project in your-project-name
> php -r "copy('.env.example', '.env');"
Loading composer repositories with package information
The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
https://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Installing dependencies (including require-dev)
- Installing vlucas/phpdotenv (v1.1.1)
Downloading: 100%
Downloading: 100%
Downloading: 100%
Failed to download vlucas/phpdotenv from dist: The "https://api.github.com/repos/vlucas/phpdotenv/zipball/0cac554ce06277e33ddf9f0b7ade4b8bbf2af3fa" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Now trying to download from source
- Installing vlucas/phpdotenv (v1.1.1)
Cloning 0cac554ce06277e33ddf9f0b7ade4b8bbf2af3fa
- Installing symfony/var-dumper (v2.7.3)
Downloading: 100%
Downloading: 100%
Downloading: 100%
Failed to download symfony/var-dumper from dist: The "https://api.github.com/repos/symfony/var-dumper/zipball/e8903ebba5eb019f5886ffce739ea9e3b7519579" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Now trying to download from source
- Installing symfony/var-dumper (v2.7.3)
Cloning e8903ebba5eb019f5886ffce739ea9e3b7519579
- Installing symfony/translation (v2.7.3)
Downloading: 100%
Downloading: 100%
Downloading: 100%
Failed to download symfony/translation from dist: The "https://api.github.com/repos/symfony/Translation/zipball/c8dc34cc936152c609cdd722af317e4239d10dd6" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Now trying to download from source
- Installing symfony/translation (v2.7.3)
Cloning c8dc34cc936152c609cdd722af317e4239d10dd6
- Installing symfony/routing (v2.7.3)
Downloading: 100%
Downloading: 100%
Downloading: 100%
Failed to download symfony/routing from dist: The "https://api.github.com/repos/symfony/Routing/zipball/ea9134f277162b02e5f80ac058b75a77637b0d26" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Now trying to download from source
- Installing symfony/routing (v2.7.3)
Cloning ea9134f277162b02e5f80ac058b75a77637b0d26
So first it says that it failed to do blah but then it says installing, cloning etc. I check the folder your-project-name and it has like 190MB of stuff. So did it work or not? If not how can I fix this issue?
I am running OS X Mavericks and PHP 5.6+
I looked at other answers but none seem to work for my system.
I install openssl via homebrew:
brew install openssl
This installs the openssl certificates to /usr/local/etc/openssl/cert.pem, so we can now use the new PHP 5.6 INI setting openssl.cafile to tell PHP where to find the certificates:
Adding
openssl.cafile=/usr/local/etc/openssl/cert.pem
Try this
composer create-project laravel/laravel c:/xampp/htdocs/laravel
-Here the path is(c:/xampp/htdocs/laravel) so change it to yours.
-If not work,than you have to reinstall ca-cert package and it will
fixed the problem!
I was having a bit of trouble getting PHPStorm to work with laravel/composer.
Upon opening PHPStorm, I created a new Composer Project: http://puu.sh/e4y1H/6fb97cf976.png
After which, I filled in necessary the details: http://puu.sh/e4y6Z/55bc60e7fc.png
After continuing, I run into the following error:
php /Users/mdobrenko/Sites/test/composer.phar create-project laravel/laravel
/Users/mdobrenko/Sites/test/composer -n --no-progress
Installing laravel/laravel (v4.2.11)
- Installing laravel/laravel (v4.2.11)
Loading from cache
Created project in /Users/mdobrenko/Sites/test/composer
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing symfony/translation (v2.5.8)
Loading from cache
- Installing symfony/security-core (v2.5.8)
Loading from cache
- Installing symfony/routing (v2.5.8)
Loading from cache
- Installing symfony/process (v2.5.8)
Loading from cache
- Installing psr/log (1.0.0)
Loading from cache
- Installing symfony/debug (v2.5.8)
Downloading: connection... Downloading: 0% Downloading: 10% Downloading: 35% Downloading: 45% Downloading: 70% Downloading: 80% Downloading: 90% Downloading: 100%
- Installing symfony/http-foundation (v2.5.8)
[ErrorException]
touch(): Utime failed: Permission denied
create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-url="..."] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [package] [directory] [version]
The 'Sites' directory that I store my development projects in, which is where this project lives, has the following permissions set:
drwxrwxrwx 11 mdobrenko staff 374 Jan 4 13:40 Sites
I noticed that most of my php artisan commands require the use of 'sudo'. Creating a new laravel project via the command:
composer create-project laravel/laravel your-project-name --prefer-dist
I have a feeling permissions may be the issue, but I am unsure of how to fix this. Any help would be appreciated!
This link should help. Try clearing the composer cache, re-installing composer, Chown the Sites folder to the same user as the apache server uses
To clear the composer cache, open a terminal and cd into your project folder: sudo composer clear-cache (sudo may not be required here)
Changing permissions: chown -R $(whoami): . this sets the owner of all files and sudirectories to the current user. giving you permission to access the files.
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.