nette / examples

🎓 Examples demonstrating the Nette Framework.
https://nette.org
88 stars 52 forks source link

Nette/Deprecated Enviroment does not exist in download zip #18

Closed martingold closed 7 years ago

martingold commented 7 years ago

When downloading zip package from here and trying out examples it spits out this warning. This can be easily solved by not using NetteLoader at all and use composer autoload instead as in web-project and sandbox. It's not a problem since you have to do composer update even with the original approach.

Issue can be easily solved by substituting

// Load Nette Framework
if (@!include __DIR__ . '/../../../Nette/loader.php') {
    die('Install Nette using `composer update`');
}

with

require __DIR__ . '/../vendor/autoload.php';

Issue is easily reproducable by doing these steps:

wget https://github.com/nette/nette/releases/download/v2.4.0/Nette-2.4-20170829.zip -O nette.zip
unzip nette.zip
cd Nette-2.4-20170829/examples/CD-collection/
composer update
php -S localhost:8000

and opening browser at http://localhost:800/www/index.php

I feel like it may have some side effects or break some intended behaviour, thus would not open PR but issue where we can have some discussion about this. Let me know if i should make PR.

martingold commented 7 years ago

I think its side effect of this commit

dg commented 7 years ago

It is bug in archive, I will reupload it.