Win32FileSystem::compare() - PHP Strict standards #387

Closed
meglio opened this Issue Jun 20, 2012 · 13 comments

4 participants

@meglio

Commit: da1e6ce
PHP: 5.4.4

PHP Strict standards: Declaration of Win32FileSystem::compare() should be compatible with FileSystem::compare($f1, $f2) in D:\wamp\www\phing-2.4.6\classes\phing\system\io\Win32FileSystem.php on line
475
PHP Stack trace:
PHP 1. {main}() D:\wamp\www\phing-2.4.6\bin\phing.php:0
PHP 2. Phing::fire() D:\wamp\www\phing-2.4.6\bin\phing.php:37
PHP 3. Phing::start() D:\wamp\www\phing-2.4.6\classes\phing\Phing.php:270
PHP 4. Phing->execute() D:\wamp\www\phing-2.4.6\classes\phing\Phing.php:157
PHP 5. PhingFile->__construct() D:\wamp\www\phing-2.4.6\classes\phing\Phing.php:349
PHP 6. FileSystem::getFileSystem() D:\wamp\www\phing-2.4.6\classes\phing\system\io\PhingFile.php:56
PHP 7. include_once() D:\wamp\www\phing-2.4.6\classes\phing\system\io\FileSystem.php:88

@meglio

Ok, actually this looks like Phing problem. But they say that it was fixed in 2.4.7, then it is suggested that we update phing dependency version to 2.4.7:

http://www.phing.info/trac/ticket/752#comment:3

@mrook

This is probably not a Propel bug either but most likely an installation issue - Propel pulls in Phing through composer, and we've only had Phing on there since 2.4.12.

@meglio

Hm, yes I can see in Propel composer.json this entry: "2.4.*"
... which must fetch 2.4.12 or what ever is available.

Any ideas why it stays at 2.4.6 on my setup and calling "composer.phar update" does not update to the latest Phing version.

@jaugustin
Propel member

you could force your composer to use phing "2.4.12" or ">=2.4.7"

@meglio

Ok, tried it, forcing "phing/phing": ">=2.4.12" in composer fixes the issue.
Is it not good to update the same in composer.json of Propel project, or it is not safe?

@jaugustin
Propel member

maybe we could exclude failing version of phing, but with the "2.4.*" we allow every version already installed

@meglio

Good idea to exclude failing version!

@mrook

The contraint is probably good, but it still boggles me why it would install 2.4.6 in the first place, as there never was a composer package prior to 2.4.12.

@meglio

Yes, interesting, how can this happen. But it just happened to me.

@mrook

After you've upgraded, is the directory D:\wamp\www\phing-2.4.6 still there? And where is the 2.4.12 install located?

@willdurand
Propel member

2.4.12 should be located in vendor/phing/phing. But if you have a global install of Phing, it can be a problem...

@mrook

Yeah, hence my earlier comment about it probably being an installation issue, not really a Propel or a Phing issue.

@meglio

Yes, really I found an old Phing installation not in vendor project folder, but in some top level directory.
And yes, there is phing version in vendor/phing/phing.

If anyhow Phing will be loaded by composer into vendor and with proper version, why can Propel rely on some other global installation of Phing? Must it not call phing from vendor/phing/phing with absolute path specified, I'm not sure if it does so or not. but it looks so, or else how that old phing was called by Propel?

I'm not sure if composer itself can find some global Phing installation and (if found) prevent checking it out into project's vendor directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment