ranlt / smarty-php

Automatically exported from code.google.com/p/smarty-php
0 stars 0 forks source link

composer classmap path settings #204

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. composer install

What version of the product are you using? On what operating system?
Smarty (v3.1.19) /tags/v3.1.19/@4876

Please provide any additional information below.
Installing smarty with composer I got the following error message:

[RuntimeException]                                                              

  Could not scan for classes inside "****/vendor/smarty/smarty/distribution/libs/Smarty.class.php" which does not appear to be a file nor a folder.

It's may be because of the path misconfiguration in the composer.json file.

Original issue reported on code.google.com by peter.ti...@bigfish.hu on 2 Oct 2014 at 11:00

GoogleCodeExporter commented 9 years ago
This is the same as my posted issue #203, happy to see I'm not the only one 
experiencing problems with this.

Original comment by Thorg...@gmail.com on 2 Oct 2014 at 11:56

GoogleCodeExporter commented 9 years ago
Same here, what happened ? tagged version packages SHOULD not be modified.

Original comment by david.gu...@playmedia.fr on 2 Oct 2014 at 2:49

GoogleCodeExporter commented 9 years ago
I'd love to know how this could have happened. Especially considering this 
wasn't some hotfix hitting a few hour old release.

3.1.19 was tagged on 7th of August and under no circumstances should have been 
touched.

Original comment by vhab...@gmail.com on 2 Oct 2014 at 2:56

GoogleCodeExporter commented 9 years ago
composer/packagist has been installing everything from the trunk, including 
documentation, development and distribution folders. That is a lot of overhead 
and there are a lot of complaints about it. All it really needs to install is 
the distribution folder. The paths are now changed to reflect this ( and only 
the distribution folder is being installed ) but now the wrong path is being 
used to find the Smarty.class.php file. Working on figuring this out. I think I 
need to set a local-path in the composer.json config. Anyone more familiar with 
composer please chime in!

Original comment by monte.o...@gmail.com on 2 Oct 2014 at 3:41

GoogleCodeExporter commented 9 years ago
This appears to be working now, the classmap path was adjusted to reflect the 
new path (omitting everything except distribution). After some battles with how 
packagist likes to cache itself I am getting successful installs, and is now 
far smaller than installing the entire trunk.

Original comment by monte.o...@gmail.com on 2 Oct 2014 at 4:03

GoogleCodeExporter commented 9 years ago

Original comment by Uwe.Tews@googlemail.com on 2 Oct 2014 at 5:55

GoogleCodeExporter commented 9 years ago
It's working now. Thanks. 

Original comment by peter.ti...@bigfish.hu on 2 Oct 2014 at 6:32

GoogleCodeExporter commented 9 years ago
Please just don't touch tags again.

I understand sometimes things need fixing, but that's why you create a new 
release and a new tag.
There is no reason, ever, to change existing tags.

Please don't turn Smarty into another library we have to pin to a specific 
revision because developers can't be trusted to leave existing tags alone.

I really can't stress enough how bad this was and how this effects live 
environments for many projects.

Original comment by vhab...@gmail.com on 3 Oct 2014 at 8:15

GoogleCodeExporter commented 9 years ago
In version 3.1.20 this bug came up again.

Original comment by peter.ti...@bigfish.hu on 13 Oct 2014 at 8:19

GoogleCodeExporter commented 9 years ago
composer.json was modified to use the zip file from the download page which 
does include the demo folder. By mistake the classmap of composer.json in the 
root folder did use the "distribution/libs/" path instead of "libs/". 
This is now fixed. 

The SVN and github is keptin sync.

Original comment by Uwe.Tews@googlemail.com on 15 Oct 2014 at 2:20

GoogleCodeExporter commented 9 years ago
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

  [RuntimeException]                                                                                                                             
  Could not scan for classes inside "/usr/share/php/vendor/smarty/smarty/libs/Smarty.class.php" which does not appear to be a file nor a folder  

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] 
[--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] 
[--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] 
[packages1] ... [packagesN]

my composer.json:

{
    "require": {
        "nette/nette": "~2.2.0",
        "mobiledetect/mobiledetectlib": "dev-master",
        "smarty/smarty": "dev-trunk",
        "slim/views": "0.1.*",
        "slim/slim": "2.*"
    }
}

what am i doing wrong?

Original comment by kapuorig...@gmail.com on 15 Oct 2014 at 12:16

GoogleCodeExporter commented 9 years ago
I could not get in touch with Monte

For the time being I switched the classmap back to distribution/libs/....

Original comment by Uwe.Tews@googlemail.com on 16 Oct 2014 at 1:38

GoogleCodeExporter commented 9 years ago
Thanks, it helped.

Original comment by kapuorig...@gmail.com on 16 Oct 2014 at 6:37

GoogleCodeExporter commented 9 years ago
Composer is now up running again. It does load the distribution currently from 
github.com/uwetews/smarty-dist. (This will change some time in the future) 

On github v3.1.21 is alread tagged. The SVN gets updated tomorrow.

Use 
    "require": {
        "smarty/smarty": "~3.1"
     }
to get it.

You must run composer clearcache to get it working.

Original comment by Uwe.Tews@googlemail.com on 18 Oct 2014 at 1:07