Skip to content

Commit 8328c2b

Browse files
authored
Merge pull request #30 from phalcon/4.0.x
2.0.0
2 parents 24a562f + a537768 commit 8328c2b

File tree

133 files changed

+4422
-1812
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+4422
-1812
lines changed

scrutinizer.yml renamed to .scrutinizer.yml_bak

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ build:
3939
- cd /home/scrutinizer/build
4040
- cp storage/ci/.env.example .env
4141
- cp storage/ci/phinx.php.example phinx.php
42+
- command: 'cd ~/ && git clone https://github.com/jbboehr/php-psr.git && cd php-psr && phpize && ./configure && make && make test && sudo make install'
43+
- sed -i '$ a \\nextension=psr.so\n' /home/scrutinizer/.phpenv/versions/7.1.12/etc/php.ini
4244
-
43-
command: 'cd ~/ && git clone -q --depth=1 https://github.com/phalcon/cphalcon.git && cd cphalcon/build && ./install'
45+
command: 'cd ~/ && git clone -q --depth=1 https://github.com/phalcon/cphalcon.git -b 4.0.x && cd cphalcon/build && ./install'
4446
not_if: 'test -e /home/scrutinizer/cphalcon/build/php7/64bits/modules/phalcon.so'
4547
-
4648
command: 'cp -v /home/scrutinizer/cphalcon/build/php7/64bits/modules/phalcon.so /home/scrutinizer/.phpenv/versions/7.1.12/lib/php/extensions/no-debug-zts-20160303/'

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Nikolaos Dimopoulos
3+
Copyright (c) 2011-present, Phalcon Team
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

api/config/providers.php

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
<?php
2+
declare(strict_types=1);
23

34
/**
4-
* Enabled providers. Order does matter
5+
* This file is part of the Phalcon API.
6+
*
7+
* (c) Phalcon Team <team@phalcon.io>
8+
*
9+
* For the full copyright and license information, please view
10+
* the LICENSE file that was distributed with this source code.
511
*/
612

7-
use Niden\Providers\CacheDataProvider;
8-
use Niden\Providers\ConfigProvider;
9-
use Niden\Providers\DatabaseProvider;
10-
use Niden\Providers\ErrorHandlerProvider;
11-
use Niden\Providers\LoggerProvider;
12-
use Niden\Providers\ModelsMetadataProvider;
13-
use Niden\Providers\RequestProvider;
14-
use Niden\Providers\ResponseProvider;
15-
use Niden\Providers\RouterProvider;
13+
use Phalcon\Api\Providers\CacheDataProvider;
14+
use Phalcon\Api\Providers\ConfigProvider;
15+
use Phalcon\Api\Providers\DatabaseProvider;
16+
use Phalcon\Api\Providers\ErrorHandlerProvider;
17+
use Phalcon\Api\Providers\LoggerProvider;
18+
use Phalcon\Api\Providers\ModelsMetadataProvider;
19+
use Phalcon\Api\Providers\RequestProvider;
20+
use Phalcon\Api\Providers\ResponseProvider;
21+
use Phalcon\Api\Providers\RouterProvider;
1622

23+
/**
24+
* Enabled providers. Order does matter
25+
*/
1726
return [
1827
ConfigProvider::class,
1928
LoggerProvider::class,

api/controllers/BaseController.php

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,38 @@
11
<?php
2-
32
declare(strict_types=1);
43

5-
namespace Niden\Api\Controllers;
4+
/**
5+
* This file is part of the Phalcon API.
6+
*
7+
* (c) Phalcon Team <team@phalcon.io>
8+
*
9+
* For the full copyright and license information, please view
10+
* the LICENSE file that was distributed with this source code.
11+
*/
612

7-
use function implode;
8-
use Niden\Http\Response;
9-
use Niden\Mvc\Model\AbstractModel;
10-
use Niden\Traits\FractalTrait;
11-
use Niden\Traits\QueryTrait;
12-
use Niden\Traits\ResponseTrait;
13-
use Phalcon\Cache\Backend\Libmemcached as CacheMemcached;
13+
namespace Phalcon\Api\Api\Controllers;
14+
15+
use Phalcon\Api\Http\Response;
16+
use Phalcon\Api\Traits\FractalTrait;
17+
use Phalcon\Api\Traits\QueryTrait;
18+
use Phalcon\Api\Traits\ResponseTrait;
19+
use Phalcon\Cache;
1420
use Phalcon\Config;
1521
use Phalcon\Filter;
1622
use Phalcon\Mvc\Controller;
17-
use Phalcon\Mvc\Model\MetaData\Libmemcached as ModelsMetadataCache;
1823
use Phalcon\Mvc\Micro;
24+
use Phalcon\Mvc\Model\MetaData\Libmemcached as ModelsMetadataCache;
1925
use function explode;
26+
use function implode;
2027
use function in_array;
2128
use function strtolower;
2229
use function substr;
2330

2431
/**
2532
* Class BaseController
2633
*
27-
* @package Niden\Api\Controllers
28-
*
2934
* @property Micro $application
30-
* @property CacheMemcached $cache
35+
* @property Cache $cache
3136
* @property Config $config
3237
* @property ModelsMetadataCache $modelsMetadata
3338
* @property Response $response

api/controllers/Companies/AddController.php

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
11
<?php
2-
32
declare(strict_types=1);
43

5-
namespace Niden\Api\Controllers\Companies;
4+
/**
5+
* This file is part of the Phalcon API.
6+
*
7+
* (c) Phalcon Team <team@phalcon.io>
8+
*
9+
* For the full copyright and license information, please view
10+
* the LICENSE file that was distributed with this source code.
11+
*/
12+
13+
namespace Phalcon\Api\Api\Controllers\Companies;
614

7-
use Niden\Constants\Relationships;
8-
use function Niden\Core\appUrl;
9-
use Niden\Exception\ModelException;
10-
use Niden\Http\Response;
11-
use Niden\Models\Companies;
12-
use Niden\Traits\FractalTrait;
13-
use Niden\Transformers\BaseTransformer;
14-
use Niden\Validation\CompaniesValidator;
15+
use Phalcon\Api\Constants\Relationships;
16+
use Phalcon\Api\Exception\ModelException;
17+
use Phalcon\Api\Http\Response;
18+
use Phalcon\Api\Models\Companies;
19+
use Phalcon\Api\Traits\FractalTrait;
20+
use Phalcon\Api\Transformers\BaseTransformer;
21+
use Phalcon\Api\Validation\CompaniesValidator;
1522
use Phalcon\Filter;
1623
use Phalcon\Mvc\Controller;
24+
use function Phalcon\Api\Core\appUrl;
1725

1826
/**
1927
* Class AddController
2028
*
21-
* @package Niden\Api\Controllers\Companies
22-
*
2329
* @property Response $response
2430
*/
2531
class AddController extends Controller

api/controllers/Companies/GetController.php

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
<?php
2-
32
declare(strict_types=1);
43

5-
namespace Niden\Api\Controllers\Companies;
4+
/**
5+
* This file is part of the Phalcon API.
6+
*
7+
* (c) Phalcon Team <team@phalcon.io>
8+
*
9+
* For the full copyright and license information, please view
10+
* the LICENSE file that was distributed with this source code.
11+
*/
12+
13+
namespace Phalcon\Api\Api\Controllers\Companies;
614

7-
use Niden\Api\Controllers\BaseController;
8-
use Niden\Constants\Relationships;
9-
use Niden\Models\Companies;
10-
use Niden\Transformers\CompaniesTransformer;
15+
use Phalcon\Api\Api\Controllers\BaseController;
16+
use Phalcon\Api\Constants\Relationships;
17+
use Phalcon\Api\Models\Companies;
18+
use Phalcon\Api\Transformers\CompaniesTransformer;
1119

1220
/**
1321
* Class GetController
14-
*
15-
* @package Niden\Api\Controllers\Companies
1622
*/
1723
class GetController extends BaseController
1824
{

api/controllers/IndividualTypes/GetController.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
<?php
2-
32
declare(strict_types=1);
43

5-
namespace Niden\Api\Controllers\IndividualTypes;
4+
/**
5+
* This file is part of the Phalcon API.
6+
*
7+
* (c) Phalcon Team <team@phalcon.io>
8+
*
9+
* For the full copyright and license information, please view
10+
* the LICENSE file that was distributed with this source code.
11+
*/
12+
13+
namespace Phalcon\Api\Api\Controllers\IndividualTypes;
614

7-
use Niden\Api\Controllers\BaseController;
8-
use Niden\Constants\Relationships;
9-
use Niden\Models\IndividualTypes;
10-
use Niden\Transformers\IndividualTypesTransformer;
15+
use Phalcon\Api\Api\Controllers\BaseController;
16+
use Phalcon\Api\Constants\Relationships;
17+
use Phalcon\Api\Models\IndividualTypes;
18+
use Phalcon\Api\Transformers\IndividualTypesTransformer;
1119

1220
/**
1321
* Class GetController
14-
*
15-
* @package Niden\Api\Controllers\IndividualTypes
1622
*/
1723
class GetController extends BaseController
1824
{
@@ -37,4 +43,3 @@ class GetController extends BaseController
3743
/** @var string */
3844
protected $transformer = IndividualTypesTransformer::class;
3945
}
40-

api/controllers/Individuals/GetController.php

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
<?php
2-
32
declare(strict_types=1);
43

5-
namespace Niden\Api\Controllers\Individuals;
4+
/**
5+
* This file is part of the Phalcon API.
6+
*
7+
* (c) Phalcon Team <team@phalcon.io>
8+
*
9+
* For the full copyright and license information, please view
10+
* the LICENSE file that was distributed with this source code.
11+
*/
12+
13+
namespace Phalcon\Api\Api\Controllers\Individuals;
614

7-
use Niden\Api\Controllers\BaseController;
8-
use Niden\Constants\Relationships;
9-
use Niden\Models\Individuals;
10-
use Niden\Transformers\IndividualsTransformer;
15+
use Phalcon\Api\Api\Controllers\BaseController;
16+
use Phalcon\Api\Constants\Relationships;
17+
use Phalcon\Api\Models\Individuals;
18+
use Phalcon\Api\Transformers\IndividualsTransformer;
1119

1220
/**
1321
* Class GetController
14-
*
15-
* @package Niden\Api\Controllers\Individuals
1622
*/
1723
class GetController extends BaseController
1824
{

api/controllers/LoginController.php

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
11
<?php
2-
32
declare(strict_types=1);
43

5-
namespace Niden\Api\Controllers;
4+
/**
5+
* This file is part of the Phalcon API.
6+
*
7+
* (c) Phalcon Team <team@phalcon.io>
8+
*
9+
* For the full copyright and license information, please view
10+
* the LICENSE file that was distributed with this source code.
11+
*/
12+
13+
namespace Phalcon\Api\Api\Controllers;
614

7-
use Niden\Exception\ModelException;
8-
use Niden\Http\Request;
9-
use Niden\Http\Response;
10-
use Niden\Models\Users;
11-
use Niden\Traits\QueryTrait;
12-
use Niden\Traits\TokenTrait;
13-
use Phalcon\Cache\Backend\Libmemcached;
15+
use Phalcon\Api\Exception\ModelException;
16+
use Phalcon\Api\Http\Request;
17+
use Phalcon\Api\Http\Response;
18+
use Phalcon\Api\Models\Users;
19+
use Phalcon\Api\Traits\QueryTrait;
20+
use Phalcon\Api\Traits\TokenTrait;
21+
use Phalcon\Cache;
1422
use Phalcon\Config;
1523
use Phalcon\Filter;
1624
use Phalcon\Mvc\Controller;
1725

1826
/**
1927
* Class LoginController
2028
*
21-
* @package Niden\Api\Controllers
22-
*
23-
* @property Libmemcached $cache
29+
* @property Cache $cache
2430
* @property Config $config
2531
* @property Request $request
2632
* @property Response $response

api/controllers/ProductTypes/GetController.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
<?php
2-
32
declare(strict_types=1);
43

5-
namespace Niden\Api\Controllers\ProductTypes;
4+
/**
5+
* This file is part of the Phalcon API.
6+
*
7+
* (c) Phalcon Team <team@phalcon.io>
8+
*
9+
* For the full copyright and license information, please view
10+
* the LICENSE file that was distributed with this source code.
11+
*/
12+
13+
namespace Phalcon\Api\Api\Controllers\ProductTypes;
614

7-
use Niden\Api\Controllers\BaseController;
8-
use Niden\Constants\Relationships;
9-
use Niden\Models\ProductTypes;
10-
use Niden\Transformers\ProductTypesTransformer;
15+
use Phalcon\Api\Api\Controllers\BaseController;
16+
use Phalcon\Api\Constants\Relationships;
17+
use Phalcon\Api\Models\ProductTypes;
18+
use Phalcon\Api\Transformers\ProductTypesTransformer;
1119

1220
/**
1321
* Class GetController
14-
*
15-
* @package Niden\Api\Controllers\ProductTypes
1622
*/
1723
class GetController extends BaseController
1824
{
@@ -37,4 +43,3 @@ class GetController extends BaseController
3743
/** @var string */
3844
protected $transformer = ProductTypesTransformer::class;
3945
}
40-

api/controllers/Products/GetController.php

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
<?php
2-
32
declare(strict_types=1);
43

5-
namespace Niden\Api\Controllers\Products;
4+
/**
5+
* This file is part of the Phalcon API.
6+
*
7+
* (c) Phalcon Team <team@phalcon.io>
8+
*
9+
* For the full copyright and license information, please view
10+
* the LICENSE file that was distributed with this source code.
11+
*/
12+
13+
namespace Phalcon\Api\Api\Controllers\Products;
614

7-
use Niden\Api\Controllers\BaseController;
8-
use Niden\Constants\Relationships;
9-
use Niden\Models\Products;
10-
use Niden\Transformers\ProductsTransformer;
15+
use Phalcon\Api\Api\Controllers\BaseController;
16+
use Phalcon\Api\Constants\Relationships;
17+
use Phalcon\Api\Models\Products;
18+
use Phalcon\Api\Transformers\ProductsTransformer;
1119

1220
/**
1321
* Class GetController
14-
*
15-
* @package Niden\Api\Controllers\Products
1622
*/
1723
class GetController extends BaseController
1824
{

0 commit comments

Comments
 (0)