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

Syntax error after adding first time #5

Open
diki opened this issue Nov 18, 2014 · 6 comments
Open

Syntax error after adding first time #5

diki opened this issue Nov 18, 2014 · 6 comments

Comments

@diki
Copy link

diki commented Nov 18, 2014

Hi,

Thanks for your efforts, it looks awesome!

I added the library without composer exactly as mentioned in readme. Hovewer i got this error, here is the stack:

Parse error: syntax error, unexpected '[' in
/lib/GeoPattern/GeoPattern/SVGElements/Circle.php on line 9 Call Stack: 0.0016 802496 1. {main}() /www/store/mustafa/index.php:0 0.0017 803008 2. require_once('/lib/GeoPattern/geopattern_loader.php')

Do you think it is my fault or a bug?

@arcdigital
Copy link
Member

What version of PHP are you using?

@mauris
Copy link

mauris commented Dec 1, 2014

Diki is probably using a PHP version < 5.4. [] arrays are only available in and after 5.4.

I have a 5.3-compatible port at https://github.com/mauris/geopattern-php

@arcdigital
Copy link
Member

Yeah, I thought that was the case - which is why I asked. Do you want to submit a PR with your changes? No need to maintain a separate port.

-Anand

Sent from my iPhone

On Dec 1, 2014, at 2:09 AM, Sam-Mauris Yong <notifications@github.commailto:notifications@github.com> wrote:

Diki is probably using a PHP version < 5.4. [] arrays are only available in and after 5.4.

I have a 5.3-compatible port at https://github.com/mauris/geopattern-php

Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-65027739.

@mauris
Copy link

mauris commented Dec 1, 2014

@arcdigital thanks for inviting a PR. I didn't raise a PR from before because I felt that it would be better to keep the 5.4 version maintained, as Laravel 4.2 requires PHP 5.4 or higher.

Currently my fork uses a separate name in packagist. I'll do a clean up before PR later (:

@mauris
Copy link

mauris commented Dec 1, 2014

@arcdigital these are the changes I've made in my fork.

  • used GeoPattern as the main namespace
  • removed the geopattern_loader.php loader
  • updated the library to PSR-2 & PSR-4 compliant
  • added PHP CS checking (found in test/phpcs.xml)
  • Added Laravel Service Provider and Facade (library still usable without using Laravel)
  • moved test into the tests folder.

@arcdigital
Copy link
Member

Awesome, thanks. I'll try and take a look tonight.

-Anand

Sent from my iPhone

On Dec 1, 2014, at 3:35 AM, Sam-Mauris Yong <notifications@github.commailto:notifications@github.com> wrote:

@arcdigitalhttps://github.com/arcdigital these are the changes I've made in my fork.

  • used GeoPattern as the main namespace
  • removed the geopattern_loader.php loader
  • updated the library to PSR-2 & PSR-4 compliant
  • added PHP CS checking (found in test/phpcs.xml)
  • Added Laravel Service Provider and Facade (library still usable without using Laravel)
  • moved test into the tests folder.

Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-65033738.

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

No branches or pull requests

3 participants