PHPGangsta / GoogleAuthenticator

PHP class to generate and verify Google Authenticator 2-factor authentication
http://phpgangsta.de/4376
BSD 2-Clause "Simplified" License
2.26k stars 697 forks source link

Make GoogleAuthenticator class PSR-4 & PSR-2 compilant #68

Open RSpeekenbrink opened 5 years ago

RSpeekenbrink commented 5 years ago

As per request #59 this PR makes the googleauthenticator class PSR-4 compilant aswell as PSR-2. By adding a namespace to the class, psr-4 autoload in composer json and tweaked test to test the new namespaced class.

This is a breaking update since the class name got changed to be PSR-2 compilant. So it falls under the 'major' updates.

Swivelgames commented 5 years ago

Any status on this?

RSpeekenbrink commented 5 years ago

@PHPGangsta

Douglasokolaa commented 4 years ago

@PHPGangsta

Swivelgames commented 4 years ago

@RSpeekenbrink @Douglasokolaa Not sure about you, but its looking like this repo is dead. No activity in 14 months, and this doesn't appear to be a priority. Bummer! :-1:

RSpeekenbrink commented 4 years ago

Yeah its sad 😢

MarkMaldaba commented 3 years ago

fwiw One of the reasons this library is useful is that it supports older PHP versions, unlike most of the alternatives that are out there. On that basis, I would advise against introducing namespaces as it reduces that coverage.

Whether or not to apply the other bits of code-tidying - don't have an opinion on that. Up to the maintainer. Nothing wrong with not using the PSR standard, so long as you're consistent.

RSpeekenbrink commented 3 years ago

fwiw One of the reasons this library is useful is that it supports older PHP versions, unlike most of the alternatives that are out there. On that basis, I would advise against introducing namespaces as it reduces that coverage.

Thats why packagist has versions, if you require to use an older version of the package due to your stack versions you can do so. Namespaces are supported all the way down to 5.3.0 according to https://www.php.net/manual/en/language.namespaces.rationale.php. These version's aren't even supported anymore so you should really consider upgrading the older projects and again if you can't that's why package versions exist.

MarkMaldaba commented 3 years ago

You're missing my point - it's not about using an old version which has the necessary support, as that also means using an old version lacking in newer features and bug fixes.

Given the other libraries out there, the only real USP for this library is its broad PHP support, so I would caution against reducing that,.