bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!
2.66k stars 446 forks source link

Were any changes made to F3 framework in the past 2 days? Composer can't require it anymore #1247

Closed elieobeid7 closed 2 years ago

elieobeid7 commented 2 years ago

We're facing this issue today, if we revert back to two days ago everything works

Warning: require(/var/www/vendor/composer/../bcosca/fatfree/lib/base.php): failed to open stream: No such file or directory in /var/www/vendor/composer/autoload_real.php on line 78
Fatal error: require(): Failed opening required '/var/www/vendor/composer/../bcosca/fatfree/lib/base.php' (include_path='.:/usr/local/lib/php') in /var/www/vendor/composer/autoload_real.php on line 78

Php version 7.4-fpm. Below is composer.json

    "require": {
        "bcosca/fatfree": "^3.6",
        other dependencies unrelated to f3...
    },

composer version 2.2.6.

We're requiring the vendor folder like so

require_once("vendor/autoload.php");

Were there any changes to f3 in these two days that caused this to happen? We use AWS ECS so every time we do a code change, we rebuild the project and install the dependencies, as a docker build.

Everything is working on docker alpine-Linux, but not on ECS, we're getting the error above

pauljherring commented 2 years ago

Were there any changes to f3 in these two days that caused this to happen?

Possibly these?

ikkez commented 2 years ago

Please use bcosca/fatfree-core instead, or initialize the git submodule that's included

elieobeid7 commented 2 years ago

@ikkez, I have a few questions

  1. Which version of bcosca/fatfree-core ?
  2. What's the difference between bcosca/fatfree-core and bcosca/fat-free ?
  3. How to initialize the git submodule that's included?
  4. if we decide to keep using bcosca/fat-free, which version to use?
ikkez commented 2 years ago
  1. whatever version you'd like. Latest is 3.8 (from yesterday)
  2. the framework core file are the same. bcosca/fatfree-core is everything you need to build your projects, bcosca/fatfree is more like a welcome package, that includes a little demo app, and a screen that shows if you have all modules installed.. thats not what you typically require for your projects.
  3. looks like the git stuff is stripped when installed with composer. With git it's just git clone https://github.com/bcosca/fatfree.git --recurse-submodules
  4. Same version as you have used before.. it's 1:1 the same core files
elieobeid7 commented 2 years ago

issue solved thank you, hopefully, other users won't face the same issues. I just reverted back to

"bcosca/fatfree": "3.7.3"

And removed ^ to stop it from ever updating to a newer version, at least for now, until we test fatfree-core or the other options.

ikkez commented 2 years ago

@elieobeid7 I've just patched the composer file for 3.8 again.. you should be able to safely upgrade now without any issues.

elieobeid7 commented 2 years ago

@ikkez That's great thank you, will test tomorrow and get back to you.