symfony1
symfony1 copied to clipboard
`symfony` as symlink (callable from anywhere)
// prevent symlink obfuscation
chdir(dirname($_SERVER['SCRIPT_FILENAME']));
https://github.com/FriendsOfSymfony1/symfony1/blob/573d5790cb007ff8a4447a148497a5516673fcea/data/bin/symfony#L12-L15
I don't get it. What changes are you requested? Could you submit a PR?
$ ln -s ~/web/symfony/lib/vendor/bin/symfony /tmp/symfony $ cd /tmp && php symfony
will only show the symfony commands - but not lib/tasks/*
Hi
@j0k3r ; should running symfony outside of the project directory raise an error or only with args (actual behavior)?
https://github.com/FriendsOfSymfony1/symfony1/blob/0c9ba112fc2d7ed21796079fb66c5e592943c701/lib/task/sfBaseTask.class.php#L57-L61
@xerc What is your suggestion, how should the symfony know where the "project root" is?
@connorhu as seen above symfony checks itself in this version (when running a task)
Behaviours
The actual working behaviour
cd path/to/symfony-project-root
./symfony --version
But, that does not work
cd path/outside
path/to/symfony-project-root/symfony --version
Possible solution
1. Simple one
Having a wrapper script.
#! /bin/sh -eu
cd path/to/symfony-project-root
./symfony "$@"
2. Harder one
Adding the feature to be able to execute symfony1 task on any current working directory.
3. Looking for current Symfony behaviour
...