Coder Social home page Coder Social logo

project's Introduction

PHPixie PHP Framework

Website: phpixie.com

PHPixie started as a micro framework and has gradually grown to be one of the most popular fullstack PHP frameworks while retaining its high performance. This is in part because of the strict architecture that avoids common pitfalls such as reliance on static methods, global scope, singletons and other antipatterns, thus also ensuring that the code is easy to read, debug, extend and test. In fact, all PHPixie components boast full unit test coverage. This PHP framework never stands in your way and provides you with full control over execution flow. It's easy to learn and straightforward to master.

But it's not all just about the code. The PHPixie community is very friendly and helpful—you can expect an answer to your question within minutes of asking it in the chat. The framework documentation is full of examples and is regularly updated with tutorial videos.

Demo

Want to see an example? Check out a simple base project implementing user and administrator authorization: https://github.com/phpixie/project-auth

Project Demo

PHPixie will fit both newcomers and experienced architects providing ease of use, solid foundation and total flexibility.

Highlights

  • Great performance - Designed for speed while not compromising on features. Proven by independant benchmarks.
  • Bundle System - Reuse and share your code via Composer as self contained bundles
  • Linear code flow - Never find yourself in an event hell ever again as event use is avoided
  • MongoDB Support - Database components support working with MongoDB out of the box, including relationships between SQL databases and Mongo collections.
  • Best Practices - Designed from scratch according to SOLID principles and industry standards.
  • Hardened Security - Using cryptographically secure hashes, random tokens and secure cookie handing.
  • Developer support - Need help? Just drop a line in the chat and get help from the creator in no time.

project's People

Contributors

dracony avatar dtan3847 avatar ftw-soft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

project's Issues

/bundles/app/web folder not found

If you are on Windows create a symlink from the /bundles/app/web folder to /web/bundles/app. For Linux and Mac users the symlink should work automatically.

I don't see /bundles/app/web folder found?

PHPixie in a subfolder

Phpixie url: http://localhost/phpixie/web (no vhost)

Is there any setting like 'base_url' => '/' in Kohana, that allows me (along with .htaccess RewriteBase) to have Phpixie in a subfolder ?

I looked for it, but it looks like it is missing - witch is an issue, since routes will work after adding 'phpixie/web/, but sending form from sample app end up not on /localhost/phpixie/web/ but on /localhost/

Add missing Docblocks

More docblocks are needed for the top layer APIs that are used the most. At the very least simple param and return tags for code completion in IDEs.

Hardcoded class names

In modules/orm/classes/orm.php (and many of your classes) you reference methods from the current class with the fully qualified name:

$rel_model = ORM::factory($rel['model']);

This destroys any ability for people to extend classes and override methods. You really should use this:

$rel_model = static::factory($rel['model']);

If it's an instance, you should do:

$rel_model = $this->factory($rel['model']);

But calling the class name from the class is unnecessary and restrictive.

Routing is extremely confusing

Based on the documentation I have no real idea how routing works.

It seems that only basic routing has been implemented, with no support for callbacks or RESTful URLs.

Simply implementing the Symfony2 Routing Component would take care of all of that, and you can wrap it up however you like if their API is no good for your PHPixie users.

SQL Syntax error on PDO delete query for Postgres

DELETE statements built by the PDO Query builder class cause an SQL Syntax error when executed against a PostgreSQL database.

Buy quickly looking at the code, I'd suggest to use the same DELETE query template for pgsql as the one used for SQLite. A patch like that works for me.

Project not work under PHP 8.1

2022/09/06 21:25:29 [error] 29485#29485: *9 FastCGI sent in stderr: "PHP message: PHP Fatal error:  During inheritance of IteratorAggregate: Uncaught ErrorException: Return type of PHPixie\Config\Storages\Type\File::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/PROJECT/vendor/phpixie/config/src/PHPixie/Config/Storages/Type/File.php:83
Stack trace:
#0 /var/www/PROJECT/vendor/phpixie/debug/src/PHPixie/Debug/Handlers.php(33): PHPixie\Debug\Handlers->handleError()
#1 /var/www/PROJECT/vendor/phpixie/config/src/PHPixie/Config/Storages/Type/File.php(5): PHPixie\Debug\Handlers->PHPixie\Debug\{closure}()
#2 /var/www/PROJECT/vendor/composer/ClassLoader.php(571): include('...')
#3 /var/www/PROJECT/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#4 /var/www/PROJECT/vendor/phpixie/config/src/PHPixie/Config/Storages.php(18): Composer\Autoload\ClassLoader->loadClass()
#5 /var/www" while reading response header from upstream, client: IP, server: PROJECT, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php-fpm.sock:", host: "PROJECT"
USER # ./console framework:database drop
ErrorException: Optional parameter $path declared before required parameter $value is implicitly treated as a required parameter

6  {
7      public function remove($path = null);
>>     public function set($path = null, $value);
9      public function slice($path = null);
10 }

Memcache bug

\vendor\phpixie\cache\classes\PHPixie\Cache\Memcache.php
Line 26
-- $this->_memcache = new Memcache();
++ $this->_memcache = new Memcache($pixie, $config);

Fatal error: Class 'phpixie_Controller'

Hi,
Today I've just try PHPixie for the first time trying to follow the 30 min tutorial page.

I cant even make it work without changing anything, I have an "Fatal error: Class 'phpixie_Controller' not found in C:\www\phpixie\system\classes\request.php on line 90" just by trying to access to http://localhost/phpixie/

is there any solution ?

regards, Leo

S

Jkm

phpixie.com broken

Sorry for my off topic issue.
certificate which used in phpixe.com seem to be broken.
So we can not access it.
My chrome said : ERR_CONNECTION_RESET
Would you like to fix it?
Thanks.

Namespaces

This framework entirely ignores namespaces, yet is PHP 5.3 and up. Even if the namespacing was only on the core to avoid conflicts with other libraries this would be beneficial.

Migrations are over-reaching and under-delivering

Trying to make migrations know everything about your database engines is a tricky way to go. Generally you want to build some sort of Schema manipulation tool, then your migrations just run up and down logic and nothing else.

For example: Schema Builder & Migrations from Laravel.

This is the same theory to how CodeIgniter, FuelPHP and Laravel have done it - mostly because its a logical seperated way of working. Kohana never really got migrations right, so going anywhere near their approach (or trying your own array based thing) is going to lead to pain and suffering.

You can't cover all possible combinations of a table structure with an array, and trying just makes for a INCREDIBLY confusing documentation process. Callbacks > Arrays, because you can document a callbacks arguments and the objects and methods that they contain.

Route->url() generates an url related from /

When using $pixie->routing->get('route')->url($options)
generated string always starts with / ( as defined in assets/config/routing.php )
in case when $pixie->basepath is different (like /web/) generated links are not valid, as front-end controller is not available in /.

Either Route::url should be using $pixie->basepath to generate correct url related to /, or is should generate relative url without leading /. However, $pixie->basepath should still be required for $absoulte == true case in Route::url call, so, $pixie->basepath should be passed to Route with __constructor, and then used in Route::url.

I have a preliminary bugfix ready, which I can post for review.

missed ","

Hi, i found missed ',' in
vendor/phpxie/cache/assets/config/cache.php on line 14

and
wrong comments
vendor/phpxie/core/classes/PHPixie/Pixie.php on line 16
($config need repair to $session)

Конструктор форм

Основной требуемый функционал:

  • Простое отображение формы по именам полей таблицы
    
  • Вывод в форме уже занесённых в таблицу данных для редактирования
    
  • Если из одной формы данные при сохранении идут в несколько таблиц, обеспечить связь
    
  • Обеспечить загрузку справочников значений для тех полей, где хранятся только идентификаторы
    
  • По возможности, сделать так, чтобы справочники могли загружаться как иерархические деревья со встроенной или внешней реализацией
    
  • Возможность использовать свой шаблон отрисовки формы вместо стандартного
    

И уже моё личное пожелание: возможность сохранить данные формы в БД не только в таблицах, но и в виде json-поля. Но этим, скорее всего, сам и буду заниматься.

where is vendor folder?

Hi.
I can't find "vendor" in github repository, so just to look code I have to find somewhere URL http://phpixie.com/, find here how to download, unpack zip-archive, run IDE and only then look at the code of this framework.

ORM: how to clone object?

Is there an elegant way to copy object? There is no clone() or copy() method in api, how can i create, for example, $pixie_twin from $pixie?

Make the greeting page more spectacular

The first thing new users see after running PHPixie is "Have fun coding". It would be nice to change it to something pleasant looking with simple css, maybe add some links to the chat, demo projects, etc.

DB class (fields)

When i call
->fields('id', 'alias')
->fields('name', 'alias2')

result contain 'alias2' field only...

Disallowing Order By RAND()

By forcing two arguments and throwing an exception if its not asc or desc you are disallowing the perfectly valid ORDER BY RAND() syntax.

Is PHPixie Dead?

Is PHPixie Dead?

There are no commits on the repo.

Ready to help in development.

Unexpected behaviour: database config loads only from /assets/config dir

Hello!

Code $builder->components()->database()->get('anything') throws exception:

PHPixie\Database\Exception\Driver: Driver '' does not exist

81         $driverName = $config->get('driver');
82         if (!array_key_exists($driverName, $this->driverClasses)) {
>>             throw new \PHPixie\Database\Exception\Driver("Driver '$driverName' does not exist");
84         }
85 

#0 /var/www/vendor/phpixie/database/src/PHPixie/Database.php:83
#1 /var/www/vendor/phpixie/database/src/PHPixie/Database.php:28
    PHPixie\Database->configDriverName(Slice)
#2 /var/www/bundles/app/src/Project/App/Processors/Grabber.php:33
    PHPixie\Database->get('goodhack_cf')
#3 /var/www/bundles/app/src/Project/App/Console/Download.php:42
    Project\App\Processors\Grabber->process('goodhack_cf')
#4 /var/www/vendor/phpixie/console/src/PHPixie/Console/Runner.php:43
    Project\App\Console\Download->run(Slice, Slice)
#5 /var/www/vendor/phpixie/console/src/PHPixie/Console/Runner.php:28
    PHPixie\Console\Runner->runCommand('app:download', array[1], array[0], true)
#6 /var/www/vendor/phpixie/console/src/PHPixie/Console.php:19
    PHPixie\Console\Runner->runFromContext()
#7 /var/www/vendor/phpixie/framework/src/PHPixie/Framework/Console.php:35
    PHPixie\Console->runCommand()
#8 /var/www/vendor/phpixie/framework/src/PHPixie/Framework.php:61
    PHPixie\Framework\Console->processSapiCommand()
#9 /var/www/console:8
    PHPixie\Framework->processConsoleSapiCommand()

Logged items:

When database config located in /bundles/app/assets/config/database.php, but all ok when file located in /assets/config/database.php, because $config->data for \PHPixie\Database::__construct() will be null in first case and contains data in second case

Expectected behaviour:
Configuration loads from /assets/config dir and after these loads from /bundles/app/assets/config dir

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.