PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, January 29, 2022

[FIXED] Composer update not installing the entirety of Laravel app

 January 29, 2022     composer-php, deployment, laravel, laravel-4     No comments   

Issue

On deploying my application through Laravel Forge, I'm presented with the following errors:

Fatal error: Class 'Illuminate\Support\Arr' not found in
/home/forge/toono.co/vendor/laravel/framework/src/Illuminate/Support/helpers.php
on line 151

This is after the composer update command has ran. I have SSH'd into the directory and low and behold, the file Arr.php doesn't exist.

The code is pulled from the master branch in BitBucket, and then the following lines are executed on the production server:

cd /home/forge/default
git pull origin master
composer install
php artisan migrate --force

Composer.json:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "laravel/framework": "4.2.*"
    },
    "require-dev": {
        "way/generators": "2.*",
        "fzaninotto/faker": "1.4.*@dev",
        "barryvdh/laravel-debugbar": "1.*",
        "flynsarmy/csv-seeder": "1.0.*"
    },
    "autoload": {
        "classmap": [
            "app/commands",
            "app/controllers",
            "app/models",
            "app/database/migrations",
            "app/database/seeds",
            "app/tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "php artisan clear-compiled",
            "php artisan debugbar:publish",
            "php artisan optimize"
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    },
    "minimum-stability": "stable"
}

Composer.lock:

"require": {
    "codesleeve/stapler": "~1",
    "laravel/framework": "~4",
    "php": ">=5.4.0"
}

Why has composer update missed that file? After a local update and even on the master branch in Github, Arr.php is there?

If I am missing any necessary code that you require, please let me know.

Any help would be greatly appreciated.


Solution

I solved this by deleting composer.lock and the vendor folder within the production server. I then used composer update.



Answered By - user860511
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing