poetapp / wordpress-plugin

Automatically post to the Po.et Network from WordPress
https://wordpress.org/plugins/po-et/
GNU General Public License v2.0
49 stars 32 forks source link

WP Standards and such #26

Closed markparolisi closed 5 years ago

markparolisi commented 6 years ago

I've made a few updates to the structure. No functional changes.

Everything should work out-of-the-box for you. Will just have to composer install to run any of the dev tasks.

I have some more things I'd think will help, but this is a start.

lautarodragan commented 6 years ago

Thanks for your PR @markparolisi ! It really is a lot of work.

I know @haydenyoung had been working on similar things — he had an open PR on coding standards and directory structures and such. Ideally I'd love for you guys to sync, I see both of you made some valuable improvements.

I also noticed you upped the minimum required WP version to 7. I'm not really sure whether WP 5 is used anymore, but would rather keep it as compatible as possible for now. Are there some significant features we're missing by staying compatible with an older version?

markparolisi commented 6 years ago

I saw @haydenyoung's PR after I pushed mine (because isn't that always how it goes). Agreed we have a lot of overlap. I think the best thing going for my PR is the updated tooling around Composer, PHPCS, PHPUnit, etc.

As for PHP 7, it's been out in full for a few years now. I don't think I'm actually using any PHP7 specific syntax (e.g. type hinting), but that's what all of my machines run so I set it to that. There are, of course, tons of advantages for running PHP7. Most notably the speed and memory efficiency.

Having this be PHP 5 compatible should be fine. You still get most things like namespaces and such. It just leads back to a question I had in #27 about the audience. If this is for bloggers on their GoDaddy domains, then you'd need to support 5, if it's for enterprise-level publishers, then 7 is the norm.

ericelliott commented 6 years ago

I don't know what version we need to support, but I'm fairly sure support for users on their own domains is important.

markparolisi commented 6 years ago

Supporting one's own domain isn't the issue. It's just the old versions of a language that won't have support by the end of this year. http://php.net/supported-versions.php But, unfortunately, I'm sure you will find that most web servers are running < 7 right now, especially in small site, shared host settings.

ericelliott commented 6 years ago

Understood. Any way to get PHP version data across blogs in the wild to decide what we need to support?

geoffturk commented 5 years ago

@markparolisi Is there anything you strongly think we should carry over from this PR and/or merge on top of (see conflicts)?

markparolisi commented 5 years ago

I'd say moving from Phing to Composer, using PHPCS, and using PHPUnit

markparolisi commented 5 years ago

closing this ticket as it is too broad. A more focused PR is here: #40 Will have another for PHPUnit and potentially a third for other random code style updates.