Where can i find a hyperlink to symfony 2.7 - symfony-2.7

I can't download the zip file symfony2.7. The link on the website doesn't work. Does anyone know why? Where can i find the symfony 2.7-zip file? I found an older version somewhere on the internet but i would really like the latest stable version.

if you really MUST have a zip : https://github.com/symfony/symfony-standard/archive/2.7.zip
also, a simple search would have revealed this
Wich is where i got this answer form .. so yea, use search next time ...

use the symfony installer, as documented on their website here
snip
Linux and Mac OS X Systems:
Open your command console and execute the
following commands:
sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
sudo chmod a+x /usr/local/bin/symfony
This will create a global symfony command in your system.
Windows Systems:
Open your command console and execute the following
command:
c:\> php -r "readfile('http://symfony.com/installer');" > symfony
Then, move the downloaded symfony file to your project's directory and
execute it as follows:
c:\> move symfony c:\projects c:\projects\> php symfony
snip
You can then use it to install a specifi version using
symfony new my_project_name 2.x.x

I always used to install it through or via the create-project command:
composer create-project symfony/framework-standard-edition project_name
If you want a 2.7 version
composer create-project symfony/framework-standard-edition project_name '2.7.*'
if there is no 2.7 stable version at the time of this writing, you need to lower the stability to dev:
composer create-project symfony/framework-standard-edition project_name '2.7.*' -s dev
-s (--stability.)

Related

Composer: Command Not Found on Mac

I have installed Composer as per the instructions command not found
After installing I get the prompt that Composer is successfully installed but when I go to check the version it gives me error "Composer: Command Not Found"
I have been looking how to fix this issue and I had to read and understand little bit and the environment variables on MAC.
I understand the issue looks simple but it will get over complicated if you didn't understand how to install composer probably.
Solution 1
I found this solution here: https://duvien.com/blog/installing-composer-mac-osx
Open a terminal and navigate to your user directory, ie cd /User//
Run this command shown below to download Composer. This will create a Phar (PHP Archive) file called composer.phar:
curl -sS https://getcomposer.org/installer | php
Now we move composer.phar file to a directory
sudo mv composer.phar /usr/local/bin/
We want to run Composer with having to be root al the time, so we need to change the permissions:
sudo chmod 755 /usr/local/bin/composer.phar
Next, we need to let Bash know where to execute Composer:
nano ~/.bash_profile
Add this line below to bash_profile and save
alias composer="php /usr/local/bin/composer.phar"
and then run this command:
source ~/.bash_profile
Finally, run:
composer --version
Solution 2:
I understand that the first command you will find online when you try to google this issue would be
curl -sS https://getcomposer.org/installer | php
But actually this is the main terminal installation but sometimes I wanted to manually install the composer, so this 2nd solution about manually installing the composer in specific directory
First of all you need to understand where are you now on the terminal
use
pwd
and then install composer manually using the following commands
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') ==='baf1608c33254d00611ac1705c1d9958c817a1a33bce370c0595974b342601bd80b92a3f46067da89e3b06bff421f182') { echo 'Installer verified'; } else { echo 'Installer corrupt';
unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
to use it on that case you will read on the terminal to use this composer installation use
Use it: php composer.phar
so just write
php composer.phar
and it should be working.... one more thing, during this installation you can install the composer to specific directory / project folder... in that case you can use a flag with command No.4 to tell the terminal to install the composer in specific directory...this flag is --install-dir=your-directory-path
and you will the terminal this time after installing composer asking you to use the following path to call the composer
Use it: php /Users/muatafa/composer.phar
if you want to read more about this issue, I think you must read the composer documentation how to install it>>> https://getcomposer.org/download/
that's how I solved my current issue... if you still have any issues comment on this replay & Hopefully we can figure it out!
I had the same problem. "composer require something" works if installed in global and not locally.
If you install composer locally you'll then install dependencies using "php composer.phar require nameofyoudependency"
To install globally open a terminal to install as mentionned on the composer website. Then run "sudo mv composer.phar /usr/local/bin/composer"
Now you can use "composer" directly to install dependencies like => "composer require something/sdk"
the composer you installed is still named /usr/local/bin/composer.phar - look in the second yellow/brownish line in your output. Just rename it to just composer
Your composer command is not set to path, use
export PATH=$PATH:/usr/local/bin/
I had the same issue, After installing composer using the command line on their website. I forgot to put composer.phar into a directory on my PATH, so it can simply be called from any directory (Global install). and then I ran this command "sudo mv composer.phar /usr/local/bin/composer" and it was resolved
I figured out. in place of "composer require twilio/sdk" I needed to use
"composer.phar require twilio/sdk" since I am on mac. It worked

How to install swoole in mac-os

Am trying to install swoole using PHP 7.0.2 in MAMP
$ pecl install swoole
Could not open input file:/app/MAMP/bin/php/php7.0.2/lib/php/peclcmd.php
Is there any alternate way to install it?
Thanks.
I have no luck installing Swoole via home brew or pecl. So I installed it manually and works. So here my step:
Make sure you php installed on your osx
php -v
phpize -v
Go to temporary folder
cd /tmp/
Download the source code
wget "https://github.com/swoole/swoole-src/archive/v4.0.3.tar.gz" -O swoole.tar.gz
Extract the file
tar xvzf swoole.tar.gz
Go to source folder
cd swoole-src-4.0.3/
Prepare the build environment for a PHP extension
phpize
Add configuration paramaters as needed
./configure
Run make. This will take some time
a successful result of make is module/swoole.so
make
create Swoole extension directory
mkdir -p /usr/local/opt/php71-swoole/
install the swoole into the PHP extensions directory
cp modules/swoole.so /usr/local/opt/php71-swoole/
Create config file for Swoole
touch /usr/local/etc/php/7.1/conf.d/ext-swoole.ini
echo "extension=/usr/local/opt/php71-swoole/swoole.so" > /usr/local/etc/php/7.1/conf.d/ext-swoole.ini
check if the swoole extension has been enabled
php -m | grep swoole
If succeed, it will send you output something like "swoole"
PS: I run PHP 7.1 and Swoole 4.0.3. Adjust it with your own version.

Getting Error in installation of yii2 advance template

I'm new to Yii2, I'm trying to install yii2 application advanced template.
I did follow these steps:
1 - Download yii2-app-advanced zip file from https://github.com/yiisoft/yii2-app-advanced
Follow GETTING STARTED guide:
My vendor directory Show Empty.
Please help, thanks in advance
Installing via Composer
If you do not already have Composer installed, you may do so by following the instructions at getcomposer.org. On Linux and Mac OS X, you'll run the following commands:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
On Windows, you'll download and run Composer-Setup.exe.
Please refer to the Composer Documentation if you encounter any problems or want to learn more about Composer usage.
If you had Composer already installed before, make sure you use an up to date version. You can update Composer by running composer self-update.
With Composer installed, you can install Yii by running the following commands under a Web-accessible folder:
composer global require "fxp/composer-asset-plugin:~1.0.3"
composer create-project --prefer-dist yiisoft/yii2-app-advanced basic
The first command installs the composer asset plugin which allows managing bower and npm package dependencies through Composer. You only need to run this command once for all. The second command installs Yii in a directory named basic. You can choose a different directory name if you want.
Note: During the installation Composer may ask for your Github login credentials. This is normal because Composer needs to get enough API rate-limit to retrieve the dependent package information from Github. For more details, please refer to the Composer documentation.
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced basic
Yii2 Installation Following command:
(1) First install Composer (LINUX):
Locally:
curl -sS https://getcomposer.org/installer | php
OR
(1) First install Composer (WINDOWS):
C:\Users\username>cd C:\bin
C:\bin>php -r "readfile('https://getcomposer.org/installer');" | php
Note: If the above fails due to readfile, use the http url or enable php_openssl.dll in php.ini
C:\bin>echo #php "%~dp0composer.phar" %>composer.bat*
C:\Users\username>composer -V
Composer version 27d8904
(2) Yii2 framework online downloads:
Basic App:
php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.0-beta
Advanced App:
php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.0-beta
(3) Other App Settings Command:
php init
php yii migrate
Refrence
use composer cos you need composer in future too!
and after unzip the advance project in www or htdocs you should navigate to your project with cmd or terminal and type yii migrate after that again type composer update

what is phpmd and how to use it?

I have Ubuntu 14.04 + Sublime text 3 and installed phpcs packages
additionalty I have installed phpcs and php-cs-fixer on my system
From this blog
I have found that phpmd (PHP Mess Detector) is also a required library, so installed phpmd as per given instructions on official php md page using alternative method From the github repository everything was finished.
:~/phpmd$ curl -s http://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
Composer successfully installed to: /home/keshav/phpmd/composer.phar
Use it: php composer.phar
but now when I write on terminal
phpmd /opt/lampp/htdocs/myproject, myfile.php
phpmd: command not found
There is phpmd folder on Home directory and everything without any error.
I have local project on core PHP create composer.json in project folder as per suggested on github .
Please tell me what means by
Then install Composer in your project (or download the composer.phar directly):
I think the problem is you've installed phpmd in a local directory, but you're trying to use it as if it was installed globally.
Installation instruction on the referenced sites can't really be made any clearer. Since you've already installed phpcs and php-cs-fixer, and those work for you, just follow similar instructions for phpmd. These are all PHP projects and are installed in a similar way.
Anyway, to use phpmd as a global command you have several options.
Github
Clone the github repository just like you did and add the phpmd bin directory to your PATH variable.
Global composer installation
Use the composer global command to install phpmd globally. You will also need to make sure that composer's bin directory is in the PATH. By default it's ~/.composer/vendor/bin.
composer global require phpmd/phpmd
This command will install phpmd globally, and as soon as ~/.composer/vendor/bin is in your PATH you'll be able to call it by simply invoking phpmd.
It's very well explained in composer's documentation: https://getcomposer.org/doc/03-cli.md#global
Download the phar archive
This is the simplest thing you can do. Simply go the phpmd releases, choose the latest and download the phar archive.
Put the phar file to whatever place you'd like. Just remember that it needs to be in your PATH. You can also rename it, to skip the .phar extension.
For example:
wget http://static.phpmd.org/php/2.1.3/phpmd.phar
sudo mv phpmd.phar /usr/bin/phpmd
sudo chmod +x /usr/bin/phpmd
Docker container
First, fetch the docker image with static analysis tools for PHP:
docker pull jakzal/phpqa
One of the tools provided by the image is phpmd. The command below will run phpmd in a docker container and mount the current working directory as a /project.
docker run -it --rm -v $(pwd):/project -w /project jakzal/phpqa \
phpmd src text cleancode,codesize,controversial,design,naming,unusedcode
When you use the composer-based install, it gets installed into the ./bin directory within the ./vendors directory. So for me, relative to my project's root directory, it was here:
./vendor/bin/phpmd
And I was able to run it from my project's root by running ./vendor/bin/phpmd . text codesize. (I'm not getting any useful output yet, but another issue)

Unable to Install Laravel 4.1 on Maverics OS X

I am trying to install laravel 4.1 on Maverics OS X using the document provided on the laravel site.
I am trying only two methods provided: via laravel installer & via composer. The third option is not preferred because I will only be able to apply these two methods on my production server.
I get following errors
a) Using via laravel Installer: I issue following commands (assuming I have downloaded in downloads dir)
downloads$ mv laravel.phar /usr/local/bin
cd ~/rohinigeeks
rohinigeeks$ sudo laravel rohinigeeks
ERROR:
sudo: laravel: command not found
b) Using Via Composer. I issue following commands
composer create-project laravel/laravel rohinigeeks --prefer-dist
ERROR:
[ErrorException]
unlink(/Users/apple/.composer/cache/files/symfony/security/ef511d47c94ad92e
37112b43efcbf7da8696a803.zip): Permission denied
Your help will be appreciated.
-AK
You installed laravel.phar in /usr/local/bin, so use that as the command name. Or rename it to /usr/local/bin/laravel:
mv laravel.phar /usr/local/bin/laravel
Also make sure it's executable:
chmod a+x /usr/local/bin/laravel
And if you're using tcsh (is this still the OSX default?), make sure to use rehash.

Resources