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

Tuesday, January 4, 2022

[FIXED] Laravel in PHP 8 dev

 January 04, 2022     composer-php, laravel, php, php-8     No comments   

Issue

I have a docker container with php 8.0.0-dev and composer. I want to create a Laravel application to test the new PHP but I have some errors.

When I try to create a new laravel project with the command:

composer create-project laravel/laravel test

The error I get is that I don't have the required PHP even though php 8.0.0 is greater than php 7.x.

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework v5.6.9 requires php ^7.1.3 -> your PHP version (8.0.0-dev) does not satisfy that requirement.
    - laravel/framework v5.6.8 requires php ^7.1.3 -> your PHP version (8.0.0-dev) does not satisfy that requirement.
    ...
    ...

Can I skip the php version check somehow?

I have tried with

--prefer-dist

and

--ignore-platform-reqs

but i obtain this error:

 Problem 1
    - Conclusion: don't install laravel/laravel v7.25.0|remove laravel/laravel v7.25.0
    - Installation request for laravel/laravel v7.25.0 -> satisfiable by laravel/laravel[v7.25.0].

Any idea?

Thanks!!!


Solution

You are trying to install laravel 5. For PHP 8 you need at least laravel 6,7 or 8 I prefer laravel 8 (last one)

If you use docker according to laravel 8 documentation you can create project with command:

curl -s https://laravel.build/example-app | bash



Answered By - Jane Tasevski
  • 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