Commit graph

16 commits

Author SHA1 Message Date
ArthurHoaro
8911863019 Fix PHP version configuration in composer.json
Without this setting, composer would download dependencies depending on the PHP version installed on the system.
E.G. I was getting doctrine/instantiator 1.1, which requires at least PHP 7.1.
2017-08-05 10:59:39 +02:00
ArthurHoaro
c31f3ce048 Upgrade netscape-bookmark-parser dependency to v2.x 2017-03-10 18:46:53 +01:00
ArthurHoaro
e6cd773f5a Fix blocking namespace issue 2017-03-08 20:00:21 +01:00
ArthurHoaro
6c7d686454 Run languages tests using PHPUnit test suites 2017-03-06 21:11:18 +01:00
VirtualTam
3c66e56435 application: introduce the Shaarli\Config namespace
Namespaces have been introduced with the REST API, and should be generalized
to the whole codebase to manage object scope and benefit from autoloading.

See:
- https://secure.php.net/manual/en/language.namespaces.php
- http://www.php-fig.org/psr/psr-4/

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2017-03-04 17:07:52 +01:00
VirtualTam
7a9daac56d API: fix JWT signature verification
Fixes https://github.com/shaarli/Shaarli/issues/737

Added:
- Base64Url utilities

Fixed:
- use URL-safe Base64 encoding/decoding functions
- use byte representations for HMAC digests
- all JWT parts are Base64Url-encoded

See:
- https://en.wikipedia.org/wiki/JSON_Web_Token
- https://tools.ietf.org/html/rfc7519
- https://scotch.io/tutorials/the-anatomy-of-a-json-web-token
- https://jwt.io/introduction/
- https://en.wikipedia.org/wiki/Base64#URL_applications
- https://secure.php.net/manual/en/function.base64-encode.php#103849

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2017-01-04 16:59:47 +01:00
ArthurHoaro
db90dfcbbc Move PubSubHubbub code as a default plugin 2016-12-20 11:41:24 +01:00
ArthurHoaro
18e6796726 REST API structure using Slim framework
* REST API routes are handle by Slim.
  * Every API controller go through ApiMiddleware which handles security.
  * First service implemented `/info`, for tests purpose.
2016-12-15 10:36:00 +01:00
ArthurHoaro
423ab02846 PHP requirement increased to PHP 5.5 - See #599 2016-12-15 10:04:05 +01:00
ArthurHoaro
e680cfea08 Use Composer to import Parsedown library
Reference #613
2016-10-22 11:13:13 +02:00
VirtualTam
8c4958c508 Composer: reference shaarli/netscape-bookmark-parser from Packagist
Relates to https://github.com/shaarli/Shaarli/pull/607
Relates to https://github.com/shaarli/Shaarli/pull/612
Relates to https://github.com/shaarli/netscape-bookmark-parser/issues/15

Modification:
- reference the "shaarli" vendor repository on Packagist instead of
  overriding the upstream package with an SCM repository

See https://packagist.org/packages/shaarli/netscape-bookmark-parser

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2016-08-10 00:47:53 +02:00
VirtualTam
7f5ab8c0a4 Composer: add shaarli/netscape-bookmark-parser
Relates to https://github.com/shaarli/Shaarli/issues/607
Relates to https://github.com/kafene/netscape-bookmark-parser/issues/6

The Shaarli-forked version is checked out as a VCS repository.

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2016-07-23 17:14:15 +02:00
VirtualTam
8945c76b62 Update composer metadata
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2016-06-15 21:27:45 +02:00
VirtualTam
129793b537 Tests: update PHPUnit to 4.8.x
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2016-04-10 01:13:09 +02:00
VirtualTam
ca74886f30 LinkDB: move to a proper file, add test coverage
Relates to #71

LinkDB
 - move to application/LinkDB.php
 - code cleanup
   - indentation
   - whitespaces
   - formatting
 - comment cleanup
   - add missing documentation
   - unify formatting

Test coverage for LinkDB
 - constructor
 - public / private access
 - link-related methods

Shaarli utilities (LinkDB dependencies)
 - move startsWith() and endsWith() functions to application/Utils.php
 - add test coverage

Dev utilities
 - Composer: add PHPUnit to dev dependencies
 - Makefile:
    - update lint targets
    - add test targets
    - generate coverage reports

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-06-11 00:45:45 +02:00
VirtualTam
00f98bdaca Code quality: Makefile to run static code checkers
Relates to #71
Relates to #95

Additions:
- Makefile for easy usage,
- Composer file to declare dev & test dependencies.

Features:
- PHP Copy/Paste Detect: detect duplicate code;
- PHP Code Sniffer: static analysis, syntax checking,
- PHP Mess Detector: static analysis, syntax checking.

Signed-off-by: VirtualTam <virtualtam@flibidi.org>
2015-03-05 23:28:43 +01:00