Skip to content

Commit

Permalink
Merge pull request #30 from phalcon/4.0.x
Browse files Browse the repository at this point in the history
2.0.0
  • Loading branch information
Jeckerson authored Dec 26, 2019
2 parents 24a562f + a537768 commit 8328c2b
Show file tree
Hide file tree
Showing 133 changed files with 4,422 additions and 1,812 deletions.
4 changes: 3 additions & 1 deletion scrutinizer.yml → .scrutinizer.yml_bak
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ build:
- cd /home/scrutinizer/build
- cp storage/ci/.env.example .env
- cp storage/ci/phinx.php.example phinx.php
- command: 'cd ~/ && git clone https://github.com/jbboehr/php-psr.git && cd php-psr && phpize && ./configure && make && make test && sudo make install'
- sed -i '$ a \\nextension=psr.so\n' /home/scrutinizer/.phpenv/versions/7.1.12/etc/php.ini
-
command: 'cd ~/ && git clone -q --depth=1 https://github.com/phalcon/cphalcon.git && cd cphalcon/build && ./install'
command: 'cd ~/ && git clone -q --depth=1 https://github.com/phalcon/cphalcon.git -b 4.0.x && cd cphalcon/build && ./install'
not_if: 'test -e /home/scrutinizer/cphalcon/build/php7/64bits/modules/phalcon.so'
-
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/'
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

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

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
29 changes: 19 additions & 10 deletions api/config/providers.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
<?php
declare(strict_types=1);

/**
* Enabled providers. Order does matter
* This file is part of the Phalcon API.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

use Niden\Providers\CacheDataProvider;
use Niden\Providers\ConfigProvider;
use Niden\Providers\DatabaseProvider;
use Niden\Providers\ErrorHandlerProvider;
use Niden\Providers\LoggerProvider;
use Niden\Providers\ModelsMetadataProvider;
use Niden\Providers\RequestProvider;
use Niden\Providers\ResponseProvider;
use Niden\Providers\RouterProvider;
use Phalcon\Api\Providers\CacheDataProvider;
use Phalcon\Api\Providers\ConfigProvider;
use Phalcon\Api\Providers\DatabaseProvider;
use Phalcon\Api\Providers\ErrorHandlerProvider;
use Phalcon\Api\Providers\LoggerProvider;
use Phalcon\Api\Providers\ModelsMetadataProvider;
use Phalcon\Api\Providers\RequestProvider;
use Phalcon\Api\Providers\ResponseProvider;
use Phalcon\Api\Providers\RouterProvider;

/**
* Enabled providers. Order does matter
*/
return [
ConfigProvider::class,
LoggerProvider::class,
Expand Down
31 changes: 18 additions & 13 deletions api/controllers/BaseController.php
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
<?php

declare(strict_types=1);

namespace Niden\Api\Controllers;
/**
* This file is part of the Phalcon API.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

use function implode;
use Niden\Http\Response;
use Niden\Mvc\Model\AbstractModel;
use Niden\Traits\FractalTrait;
use Niden\Traits\QueryTrait;
use Niden\Traits\ResponseTrait;
use Phalcon\Cache\Backend\Libmemcached as CacheMemcached;
namespace Phalcon\Api\Api\Controllers;

use Phalcon\Api\Http\Response;
use Phalcon\Api\Traits\FractalTrait;
use Phalcon\Api\Traits\QueryTrait;
use Phalcon\Api\Traits\ResponseTrait;
use Phalcon\Cache;
use Phalcon\Config;
use Phalcon\Filter;
use Phalcon\Mvc\Controller;
use Phalcon\Mvc\Model\MetaData\Libmemcached as ModelsMetadataCache;
use Phalcon\Mvc\Micro;
use Phalcon\Mvc\Model\MetaData\Libmemcached as ModelsMetadataCache;
use function explode;
use function implode;
use function in_array;
use function strtolower;
use function substr;

/**
* Class BaseController
*
* @package Niden\Api\Controllers
*
* @property Micro $application
* @property CacheMemcached $cache
* @property Cache $cache
* @property Config $config
* @property ModelsMetadataCache $modelsMetadata
* @property Response $response
Expand Down
30 changes: 18 additions & 12 deletions api/controllers/Companies/AddController.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
<?php

declare(strict_types=1);

namespace Niden\Api\Controllers\Companies;
/**
* This file is part of the Phalcon API.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

namespace Phalcon\Api\Api\Controllers\Companies;

use Niden\Constants\Relationships;
use function Niden\Core\appUrl;
use Niden\Exception\ModelException;
use Niden\Http\Response;
use Niden\Models\Companies;
use Niden\Traits\FractalTrait;
use Niden\Transformers\BaseTransformer;
use Niden\Validation\CompaniesValidator;
use Phalcon\Api\Constants\Relationships;
use Phalcon\Api\Exception\ModelException;
use Phalcon\Api\Http\Response;
use Phalcon\Api\Models\Companies;
use Phalcon\Api\Traits\FractalTrait;
use Phalcon\Api\Transformers\BaseTransformer;
use Phalcon\Api\Validation\CompaniesValidator;
use Phalcon\Filter;
use Phalcon\Mvc\Controller;
use function Phalcon\Api\Core\appUrl;

/**
* Class AddController
*
* @package Niden\Api\Controllers\Companies
*
* @property Response $response
*/
class AddController extends Controller
Expand Down
22 changes: 14 additions & 8 deletions api/controllers/Companies/GetController.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
<?php

declare(strict_types=1);

namespace Niden\Api\Controllers\Companies;
/**
* This file is part of the Phalcon API.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

namespace Phalcon\Api\Api\Controllers\Companies;

use Niden\Api\Controllers\BaseController;
use Niden\Constants\Relationships;
use Niden\Models\Companies;
use Niden\Transformers\CompaniesTransformer;
use Phalcon\Api\Api\Controllers\BaseController;
use Phalcon\Api\Constants\Relationships;
use Phalcon\Api\Models\Companies;
use Phalcon\Api\Transformers\CompaniesTransformer;

/**
* Class GetController
*
* @package Niden\Api\Controllers\Companies
*/
class GetController extends BaseController
{
Expand Down
23 changes: 14 additions & 9 deletions api/controllers/IndividualTypes/GetController.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
<?php

declare(strict_types=1);

namespace Niden\Api\Controllers\IndividualTypes;
/**
* This file is part of the Phalcon API.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

namespace Phalcon\Api\Api\Controllers\IndividualTypes;

use Niden\Api\Controllers\BaseController;
use Niden\Constants\Relationships;
use Niden\Models\IndividualTypes;
use Niden\Transformers\IndividualTypesTransformer;
use Phalcon\Api\Api\Controllers\BaseController;
use Phalcon\Api\Constants\Relationships;
use Phalcon\Api\Models\IndividualTypes;
use Phalcon\Api\Transformers\IndividualTypesTransformer;

/**
* Class GetController
*
* @package Niden\Api\Controllers\IndividualTypes
*/
class GetController extends BaseController
{
Expand All @@ -37,4 +43,3 @@ class GetController extends BaseController
/** @var string */
protected $transformer = IndividualTypesTransformer::class;
}

22 changes: 14 additions & 8 deletions api/controllers/Individuals/GetController.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
<?php

declare(strict_types=1);

namespace Niden\Api\Controllers\Individuals;
/**
* This file is part of the Phalcon API.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

namespace Phalcon\Api\Api\Controllers\Individuals;

use Niden\Api\Controllers\BaseController;
use Niden\Constants\Relationships;
use Niden\Models\Individuals;
use Niden\Transformers\IndividualsTransformer;
use Phalcon\Api\Api\Controllers\BaseController;
use Phalcon\Api\Constants\Relationships;
use Phalcon\Api\Models\Individuals;
use Phalcon\Api\Transformers\IndividualsTransformer;

/**
* Class GetController
*
* @package Niden\Api\Controllers\Individuals
*/
class GetController extends BaseController
{
Expand Down
30 changes: 18 additions & 12 deletions api/controllers/LoginController.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
<?php

declare(strict_types=1);

namespace Niden\Api\Controllers;
/**
* This file is part of the Phalcon API.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

namespace Phalcon\Api\Api\Controllers;

use Niden\Exception\ModelException;
use Niden\Http\Request;
use Niden\Http\Response;
use Niden\Models\Users;
use Niden\Traits\QueryTrait;
use Niden\Traits\TokenTrait;
use Phalcon\Cache\Backend\Libmemcached;
use Phalcon\Api\Exception\ModelException;
use Phalcon\Api\Http\Request;
use Phalcon\Api\Http\Response;
use Phalcon\Api\Models\Users;
use Phalcon\Api\Traits\QueryTrait;
use Phalcon\Api\Traits\TokenTrait;
use Phalcon\Cache;
use Phalcon\Config;
use Phalcon\Filter;
use Phalcon\Mvc\Controller;

/**
* Class LoginController
*
* @package Niden\Api\Controllers
*
* @property Libmemcached $cache
* @property Cache $cache
* @property Config $config
* @property Request $request
* @property Response $response
Expand Down
23 changes: 14 additions & 9 deletions api/controllers/ProductTypes/GetController.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
<?php

declare(strict_types=1);

namespace Niden\Api\Controllers\ProductTypes;
/**
* This file is part of the Phalcon API.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

namespace Phalcon\Api\Api\Controllers\ProductTypes;

use Niden\Api\Controllers\BaseController;
use Niden\Constants\Relationships;
use Niden\Models\ProductTypes;
use Niden\Transformers\ProductTypesTransformer;
use Phalcon\Api\Api\Controllers\BaseController;
use Phalcon\Api\Constants\Relationships;
use Phalcon\Api\Models\ProductTypes;
use Phalcon\Api\Transformers\ProductTypesTransformer;

/**
* Class GetController
*
* @package Niden\Api\Controllers\ProductTypes
*/
class GetController extends BaseController
{
Expand All @@ -37,4 +43,3 @@ class GetController extends BaseController
/** @var string */
protected $transformer = ProductTypesTransformer::class;
}

22 changes: 14 additions & 8 deletions api/controllers/Products/GetController.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
<?php

declare(strict_types=1);

namespace Niden\Api\Controllers\Products;
/**
* This file is part of the Phalcon API.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

namespace Phalcon\Api\Api\Controllers\Products;

use Niden\Api\Controllers\BaseController;
use Niden\Constants\Relationships;
use Niden\Models\Products;
use Niden\Transformers\ProductsTransformer;
use Phalcon\Api\Api\Controllers\BaseController;
use Phalcon\Api\Constants\Relationships;
use Phalcon\Api\Models\Products;
use Phalcon\Api\Transformers\ProductsTransformer;

/**
* Class GetController
*
* @package Niden\Api\Controllers\Products
*/
class GetController extends BaseController
{
Expand Down
Loading

0 comments on commit 8328c2b

Please sign in to comment.