[PR #578] [MERGED] Conditionally loading ServiceProvider #1284

Closed
opened 2026-02-26 03:30:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/koel/koel/pull/578
Author: @serima
Created: 4/23/2017
Status: Merged
Merged: 5/10/2017
Merged by: @phanan

Base: masterHead: serima/fix-composer-dependencies


📝 Commits (9)

  • 2bc8d76 Move some packages to "require"
  • e53bcda Revert "Move some packages to "require""
  • 840ca8c Change method of registering some service providers
  • 1536e64 Change from register to bind
  • 0454c57 Fix AppServiceProvider.php
  • 765bb90 Spaces
  • c088d8a Delete an extra space
  • 8b26bd2 Register also IdeHelperServiceProvider
  • 97ad704 Delete binding

📊 Changes

2 files changed (+4 additions, -3 deletions)

View changed files

📝 app/Providers/AppServiceProvider.php (+4 -1)
📝 config/app.php (+0 -2)

📄 Description

After checking the operation locally, when deploying to operate with heroku, the following error occurred. Deployment to heroku seems to be a specification that forcibly grants the "--no-dev" option when composer install.
Originally, I think that options should exist on heroku side, but it seems that we can not do such a situation at present.

https://devcenter.heroku.com/articles/php-support#build-behavior

Considering to make it run on various platforms, I think that it is important that deployment is completed simply.

Thanks.

% git push heroku master
Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 2.63 KiB | 0 bytes/s, done.
Total 9 (delta 6), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> PHP app detected
remote: -----> Bootstrapping...
        remote: -----> Installing platform packages...
remote:        - php (7.1.3)
remote:        - ext-mbstring (bundled with php)
remote:        - apache (2.4.20)
remote:        - nginx (1.8.1)
remote: -----> Installing dependencies...
remote:        Composer version 1.4.1 2017-03-10 09:29:45
remote:        Loading composer repositories with package information
remote:        Installing dependencies from lock file
remote:        Package operations: 44 installs, 0 updates, 0 removals
remote:          - Installing vlucas/phpdotenv (v2.4.0): Loading from cache
remote:          - Installing symfony/css-selector (v3.0.9): Loading from cache
remote:          - Installing tijsverkoyen/css-to-inline-styles (2.2.0): Loading from cache
remote:          - Installing symfony/polyfill-mbstring (v1.3.0): Loading from cache
remote:          - Installing symfony/var-dumper (v3.2.7): Downloading (100%)
remote:          - Installing symfony/routing (v3.2.7): Loading from cache
remote:          - Installing symfony/process (v3.2.7): Downloading (100%)
remote:          - Installing symfony/http-foundation (v3.2.7): Downloading (100%)
remote:          - Installing symfony/event-dispatcher (v3.2.7): Downloading (100%)
remote:          - Installing psr/log (1.0.2): Loading from cache
remote:          - Installing symfony/debug (v3.2.7): Downloading (100%)
remote:          - Installing symfony/http-kernel (v3.2.7): Downloading (100%)
remote:          - Installing symfony/finder (v3.2.7): Downloading (100%)
remote:          - Installing symfony/console (v3.2.7): Downloading (100%)
remote:          - Installing swiftmailer/swiftmailer (v5.4.7): Downloading (100%)
remote:          - Installing paragonie/random_compat (v2.0.10): Loading from cache
remote:          - Installing ramsey/uuid (3.6.1): Loading from cache
remote:          - Installing symfony/translation (v3.2.7): Downloading (100%)
remote:          - Installing nesbot/carbon (1.22.1): Loading from cache
remote:          - Installing mtdowling/cron-expression (v1.2.0): Loading from cache
remote:          - Installing monolog/monolog (1.22.1): Loading from cache
remote:          - Installing league/flysystem (1.0.38): Downloading (100%)
remote:          - Installing erusev/parsedown (1.6.2): Loading from cache
remote:          - Installing doctrine/inflector (v1.1.0): Loading from cache
remote:          - Installing laravel/framework (v5.4.19): Downloading (100%)
remote:          - Installing mtdowling/jmespath.php (2.4.0): Loading from cache
remote:          - Installing psr/http-message (1.0.1): Loading from cache
remote:          - Installing guzzlehttp/psr7 (1.4.2): Loading from cache
remote:          - Installing guzzlehttp/promises (v1.3.1): Loading from cache
remote:          - Installing guzzlehttp/guzzle (6.2.3): Loading from cache
remote:          - Installing aws/aws-sdk-php (3.26.2): Downloading (100%)
remote:          - Installing aws/aws-sdk-php-laravel (3.1.0): Loading from cache
remote:          - Installing jakub-onderka/php-console-color (0.1): Downloading (100%)
remote:          - Installing james-heinrich/getid3 (v1.9.14): Loading from cache
remote:          - Installing nikic/php-parser (v3.0.5): Downloading (100%)
remote:          - Installing jakub-onderka/php-console-highlighter (v0.3.2): Downloading (100%)
remote:          - Installing dnoegel/php-xdg-base-dir (0.1): Downloading (100%)
remote:          - Installing psy/psysh (v0.8.3): Downloading (100%)
remote:          - Installing laravel/tinker (v1.0.0): Downloading (100%)
remote:          - Installing phpseclib/phpseclib (0.3.10): Loading from cache
remote:          - Installing predis/predis (v1.1.1): Loading from cache
remote:          - Installing pusher/pusher-php-server (2.6.3): Loading from cache
remote:          - Installing namshi/jose (5.0.2): Loading from cache
remote:          - Installing tymon/jwt-auth (0.5.11): Downloading (100%)
remote:        Generating optimized autoload files
remote:        > php artisan clear-compiled
remote:
remote:
remote:          [Symfony\Component\Debug\Exception\FatalThrowableError]
remote:          Class 'Laravel\Tinker\TinkerServiceProvider' not found
remote:
remote:
remote:        Script php artisan clear-compiled handling the post-install-cmd event returned with error code 1
remote:  !     Push rejected, failed to compile PHP app.
remote:
remote:  !     Push failed
remote: Verifying deploy....
remote:
remote: !       Push rejected to koelfs.
remote:
To https://git.heroku.com/koelfs.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/koelfs.git'

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/koel/koel/pull/578 **Author:** [@serima](https://github.com/serima) **Created:** 4/23/2017 **Status:** ✅ Merged **Merged:** 5/10/2017 **Merged by:** [@phanan](https://github.com/phanan) **Base:** `master` ← **Head:** `serima/fix-composer-dependencies` --- ### 📝 Commits (9) - [`2bc8d76`](https://github.com/koel/koel/commit/2bc8d76a04398b79c0714afbb8b7b4e2f4abfa75) Move some packages to "require" - [`e53bcda`](https://github.com/koel/koel/commit/e53bcda6461640d7f060eb73bd1f81c11d65e4bb) Revert "Move some packages to "require"" - [`840ca8c`](https://github.com/koel/koel/commit/840ca8c295e5af21336ab53e31a3e4ae182cb775) Change method of registering some service providers - [`1536e64`](https://github.com/koel/koel/commit/1536e64c7c7e932340dffc375ba818d75a91fcf1) Change from register to bind - [`0454c57`](https://github.com/koel/koel/commit/0454c57c33dfb757c8457848fdcc69c05c15d09f) Fix AppServiceProvider.php - [`765bb90`](https://github.com/koel/koel/commit/765bb90d340f8b5bb180518626d977cb639edd53) Spaces - [`c088d8a`](https://github.com/koel/koel/commit/c088d8a83053cd47f0f4957300168254c41b5a95) Delete an extra space - [`8b26bd2`](https://github.com/koel/koel/commit/8b26bd24c91365b46a38f3a68ce09fb274c2caa2) Register also IdeHelperServiceProvider - [`97ad704`](https://github.com/koel/koel/commit/97ad7042ab27ecd081bfd068fd79a00fe2c2dd8b) Delete binding ### 📊 Changes **2 files changed** (+4 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `app/Providers/AppServiceProvider.php` (+4 -1) 📝 `config/app.php` (+0 -2) </details> ### 📄 Description After checking the operation locally, when deploying to operate with heroku, the following error occurred. Deployment to heroku seems to be a specification that forcibly grants the "--no-dev" option when composer install. Originally, I think that options should exist on heroku side, but it seems that we can not do such a situation at present. https://devcenter.heroku.com/articles/php-support#build-behavior Considering to make it run on various platforms, I think that it is important that deployment is completed simply. Thanks. ``` % git push heroku master Counting objects: 9, done. Delta compression using up to 4 threads. Compressing objects: 100% (9/9), done. Writing objects: 100% (9/9), 2.63 KiB | 0 bytes/s, done. Total 9 (delta 6), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> PHP app detected remote: -----> Bootstrapping... remote: -----> Installing platform packages... remote: - php (7.1.3) remote: - ext-mbstring (bundled with php) remote: - apache (2.4.20) remote: - nginx (1.8.1) remote: -----> Installing dependencies... remote: Composer version 1.4.1 2017-03-10 09:29:45 remote: Loading composer repositories with package information remote: Installing dependencies from lock file remote: Package operations: 44 installs, 0 updates, 0 removals remote: - Installing vlucas/phpdotenv (v2.4.0): Loading from cache remote: - Installing symfony/css-selector (v3.0.9): Loading from cache remote: - Installing tijsverkoyen/css-to-inline-styles (2.2.0): Loading from cache remote: - Installing symfony/polyfill-mbstring (v1.3.0): Loading from cache remote: - Installing symfony/var-dumper (v3.2.7): Downloading (100%) remote: - Installing symfony/routing (v3.2.7): Loading from cache remote: - Installing symfony/process (v3.2.7): Downloading (100%) remote: - Installing symfony/http-foundation (v3.2.7): Downloading (100%) remote: - Installing symfony/event-dispatcher (v3.2.7): Downloading (100%) remote: - Installing psr/log (1.0.2): Loading from cache remote: - Installing symfony/debug (v3.2.7): Downloading (100%) remote: - Installing symfony/http-kernel (v3.2.7): Downloading (100%) remote: - Installing symfony/finder (v3.2.7): Downloading (100%) remote: - Installing symfony/console (v3.2.7): Downloading (100%) remote: - Installing swiftmailer/swiftmailer (v5.4.7): Downloading (100%) remote: - Installing paragonie/random_compat (v2.0.10): Loading from cache remote: - Installing ramsey/uuid (3.6.1): Loading from cache remote: - Installing symfony/translation (v3.2.7): Downloading (100%) remote: - Installing nesbot/carbon (1.22.1): Loading from cache remote: - Installing mtdowling/cron-expression (v1.2.0): Loading from cache remote: - Installing monolog/monolog (1.22.1): Loading from cache remote: - Installing league/flysystem (1.0.38): Downloading (100%) remote: - Installing erusev/parsedown (1.6.2): Loading from cache remote: - Installing doctrine/inflector (v1.1.0): Loading from cache remote: - Installing laravel/framework (v5.4.19): Downloading (100%) remote: - Installing mtdowling/jmespath.php (2.4.0): Loading from cache remote: - Installing psr/http-message (1.0.1): Loading from cache remote: - Installing guzzlehttp/psr7 (1.4.2): Loading from cache remote: - Installing guzzlehttp/promises (v1.3.1): Loading from cache remote: - Installing guzzlehttp/guzzle (6.2.3): Loading from cache remote: - Installing aws/aws-sdk-php (3.26.2): Downloading (100%) remote: - Installing aws/aws-sdk-php-laravel (3.1.0): Loading from cache remote: - Installing jakub-onderka/php-console-color (0.1): Downloading (100%) remote: - Installing james-heinrich/getid3 (v1.9.14): Loading from cache remote: - Installing nikic/php-parser (v3.0.5): Downloading (100%) remote: - Installing jakub-onderka/php-console-highlighter (v0.3.2): Downloading (100%) remote: - Installing dnoegel/php-xdg-base-dir (0.1): Downloading (100%) remote: - Installing psy/psysh (v0.8.3): Downloading (100%) remote: - Installing laravel/tinker (v1.0.0): Downloading (100%) remote: - Installing phpseclib/phpseclib (0.3.10): Loading from cache remote: - Installing predis/predis (v1.1.1): Loading from cache remote: - Installing pusher/pusher-php-server (2.6.3): Loading from cache remote: - Installing namshi/jose (5.0.2): Loading from cache remote: - Installing tymon/jwt-auth (0.5.11): Downloading (100%) remote: Generating optimized autoload files remote: > php artisan clear-compiled remote: remote: remote: [Symfony\Component\Debug\Exception\FatalThrowableError] remote: Class 'Laravel\Tinker\TinkerServiceProvider' not found remote: remote: remote: Script php artisan clear-compiled handling the post-install-cmd event returned with error code 1 remote: ! Push rejected, failed to compile PHP app. remote: remote: ! Push failed remote: Verifying deploy.... remote: remote: ! Push rejected to koelfs. remote: To https://git.heroku.com/koelfs.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/koelfs.git' ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 03:30:26 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#1284
No description provided.