Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for PHP 5.4 #12

Closed
wants to merge 1 commit into from
Closed

Added support for PHP 5.4 #12

wants to merge 1 commit into from

Conversation

mdjimy
Copy link

@mdjimy mdjimy commented May 9, 2015

Hi to everybody.

I've replaced all PHP 5.5 features such as [] and ::class with their alternatives, so now can be this awesome extension used under PHP 5.4 too.

I've really needed this, because my server is hosting several sites which requires PHP 5.4, so I can't update it to newer version. :(

@TomasVotruba
Copy link
Member

Hi, duplicate to #11.
Have tried installing via composer require command?

@mdjimy
Copy link
Author

mdjimy commented May 9, 2015

Whopsie... sorry, I've didn't noticed.

I've done all changes already 2 weeks ago, but was too lazy to create pull request.

And this is my output of composer require zenify/doctrine-migrations

 Problem 1
    - zenify/doctrine-migrations dev-master requires php >=5.5 -> your PHP version (5.4.6-1ubuntu1.8) does not satisfy that requirement.
    - zenify/doctrine-migrations dev-master requires php >=5.5 -> your PHP version (5.4.6-1ubuntu1.8) does not satisfy that requirement.
    - zenify/doctrine-migrations dev-master requires php >=5.5 -> your PHP version (5.4.6-1ubuntu1.8) does not satisfy that requirement.
    - Installation request for zenify/doctrine-migrations dev-master -> satisfiable by zenify/doctrine-migrations[dev-master].

@TomasVotruba
Copy link
Member

@mdjimy Could you show me rest of your composer.json? It looks like, you require zenify/doctrine-migrations of dev-master version.

Try version ~2.0 as in Readme.

@mdjimy
Copy link
Author

mdjimy commented May 9, 2015

Yea, I know... strange...

My composer.json looks like this:

``` json``````
{
"name": "nette/sandbox",
"description": "The sandbox is a pre-packaged Nette Framework project, basic configured structure for your application.",
"homepage": "http://nette.org",
"type": "project",
"license": ["BSD-3-Clause", "GPL-2.0", "GPL-3.0"],
"authors": [
{
"name": "David Grudl",
"homepage": "http://davidgrudl.com"
},
{
"name": "Nette Community",
"homepage": "http://nette.org/contributors"
}
],
"require": {
"php": "~5.4.0",
"nette/nette": "~2.3.0",
"dg/adminer-custom": "~1.6",
"kdyby/doctrine": "~2.3",
"wiredmedia/doctrine-extensions": "0.1.*"
},
"require-dev": {
"nette/tester": "~1.3"
},
"minimum-stability": "dev",
"prefer-stable": true
}


And using `composer require zenify/doctrine-migrations` I'm trying to add migrations.

@TomasVotruba
Copy link
Member

Try dropping these lines and retry:

"minimum-stability": "dev",
"prefer-stable": true

Also requiring "php": "~5.4.0" is probably useless limitation. >=5.4 should be enough

@mdjimy
Copy link
Author

mdjimy commented May 9, 2015

Never mind... I'll just add it manually into composer.json:D

Also, this:

"minimum-stability": "dev",
"prefer-stable": true

shouldn't have any effect unles extension version (with PHP 5.4) is lower stability than dev (ie. alpha)

And PHP limitatin ~5.4.0 is important, because my PHP cli version is 5.6, and apache uses PHP 5.4. :D

But thanks for your time!!! :)

@TomasVotruba
Copy link
Member

Never mind... I'll just add it manually into composer.json:D

There is no stable tag for doctrine-migrations package yet, so this is the only option for now.

What composer.json configuration worked for you?

And PHP limitatin ~5.4.0 is important, because my PHP cli version is 5.6, and apache uses PHP 5.4. :D

Interesting. I see.

@mdjimy
Copy link
Author

mdjimy commented May 9, 2015

What composer.json configuration worked for you?

{
    "name": "nette/sandbox",
    "description": "The sandbox is a pre-packaged Nette Framework project, basic configured structure for your application.",
    "homepage": "http://nette.org",
    "type": "project",
    "license": ["BSD-3-Clause", "GPL-2.0", "GPL-3.0"],
    "authors": [
        {
            "name": "David Grudl",
            "homepage": "http://davidgrudl.com"
        },
        {
            "name": "Nette Community",
            "homepage": "http://nette.org/contributors"
        }
    ],
    "require": {
        "php": "~5.4.0",
        "nette/nette": "~2.3.0",
        "dg/adminer-custom": "~1.6",
        "kdyby/doctrine": "~2.3",
        "wiredmedia/doctrine-extensions": "0.1.*",
        "zenify/doctrine-migrations": "*"
    },
    "require-dev": {
        "nette/tester": "~1.3"
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

And PHP limitatin ~5.4.0 is important, because my PHP cli version is 5.6, and apache uses PHP 5.4. :D

Interesting. I see.

Well I'm limited by requirements of other running sites & apps on server, so...

@TomasVotruba
Copy link
Member

@mdjimy Have you thought about VPS?

@mdjimy
Copy link
Author

mdjimy commented May 9, 2015

Nope.
To be precise, It's not my server, but clients one, so I can't afford it, because it goes against demands, and also I don't have all privileges.

But never mind, and thanks for your help!!! ;)

@TomasVotruba
Copy link
Member

Ok :), GL with the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants