Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
9a9eeecd
Commit
9a9eeecd
authored
May 15, 2011
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed a regression where the Silex.phar could not be used anymore to simulate requests on the CLI
parent
1cf18343
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
doc/usage.rst
doc/usage.rst
+3
-3
src/Silex/Compiler.php
src/Silex/Compiler.php
+8
-5
No files found.
doc/usage.rst
View file @
9a9eeecd
...
@@ -481,12 +481,12 @@ Console
...
@@ -481,12 +481,12 @@ Console
Silex includes a lightweight console for updating to the latest
Silex includes a lightweight console for updating to the latest
version.
version.
To find out which version of Silex you are using,
just invok
e
To find out which version of Silex you are using,
invoke ``silex.phar`` on th
e
``silex.phar`` on the command-line without any arguments
:
command-line with ``version`` as an argument
:
.. code-block:: text
.. code-block:: text
$ php silex.phar
$ php silex.phar
version
Silex version 0a243d3 2011-04-17 14:49:31 +0200
Silex version 0a243d3 2011-04-17 14:49:31 +0200
To check that your are using the latest version, run the ``check`` command:
To check that your are using the latest version, run the ``check`` command:
...
...
src/Silex/Compiler.php
View file @
9a9eeecd
...
@@ -105,10 +105,8 @@ Phar::mapPhar('silex.phar');
...
@@ -105,10 +105,8 @@ Phar::mapPhar('silex.phar');
require_once 'phar://silex.phar/autoload.php';
require_once 'phar://silex.phar/autoload.php';
if ('cli' === php_sapi_name()) {
if ('cli' === php_sapi_name() && isset($argv[1])) {
$command = isset($argv[1]) ? $argv[1] : null;
switch ($argv[1]) {
switch ($command) {
case 'update':
case 'update':
$remoteFilename = 'http://silex-project.org/get/silex.phar';
$remoteFilename = 'http://silex-project.org/get/silex.phar';
$localFilename = getcwd().'/silex.phar';
$localFilename = getcwd().'/silex.phar';
...
@@ -126,10 +124,15 @@ if ('cli' === php_sapi_name()) {
...
@@ -126,10 +124,15 @@ if ('cli' === php_sapi_name()) {
}
}
break;
break;
default
:
case 'version'
:
printf("Silex version %s\n", Silex\Application::VERSION);
printf("Silex version %s\n", Silex\Application::VERSION);
break;
break;
default:
printf("Unkown command '%s' (available commands: version, check, and update).\n", $argv[1]);
}
}
exit(0);
}
}
__HALT_COMPILER();
__HALT_COMPILER();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment