Coder Social home page Coder Social logo

bakeiro / light-php Goto Github PK

View Code? Open in Web Editor NEW
77.0 6.0 13.0 9.49 MB

Easy, Lightweight, open source and magic-free PHP framework

Home Page: https://bakeiro.github.io/Light-PHP-documentation/

License: MIT License

PHP 92.78% CSS 1.98% JavaScript 4.97% Hack 0.27%
php framework mvc-php-application mvc-php microframework

light-php's Introduction

logo

Micro PHP framework.
- Explore the DOCS -

GitHub GitHub code size in bytes GitHub stars Packagist Version


Light-PHP

Easiest PHP framework

Light-php Light PHP it's an open-source minimal PHP framework that only includes what's necessary, avoiding big and complex structures, yet capable of building big and fully-featured API/Websites.
It's advantages from others frameworks are the small learning curve, possibility to start working without reading massive documentations and it's easy to understand how the framework works and being able to modify its original behavior.

This project includes the PSR-0, PSR-1, PSR-4, PSR-11, PSR-12 standards, good coding practices, MVC structure, service container and much more!

What's this project?

This is a lightweight micro PHP Framework focused on simplicity, aimed to capable to build small, medium Apps/APIs (big Apps/APIs even possible, dividing your app in smaller ones) and making things just work.

What's not this project?

This doesn't pretend to be a full complete PHP framework, highly abstracted, with ORM, autowiring, automatic processes, complex algorithm, or any kind of 'black magic' that frameworks comes nowdays.

For who is this project?

This proyect can be aimed for people who only needs a small proyect to build and doesn't need a complete PHP framework, for beginners in PHP who need a easy entry point, for people who want to try a new PHP framework, and this proyect cover all it's needs

What are benefits of using Light-php:

  • Quick development
  • Lightweight
  • MVC structure
  • Focused on simplicity
  • Implements best practices
  • Security implementations

Installation

composer create-project bakeiro/light-php

License

Light-PHP is licensed under the Open Source MIT license, feel free to use it, modify it or contribute on it!

Built by David Baqueiro

Support

Light-PHP is an open source project licensed under the MIT license. It's completely free to use. However, it would be great if you buy me a cup of coffee once in a while to keep me awake :)

Buy Me A Coffee

light-php's People

Contributors

bakeiro avatar dependabot[bot] avatar ezoicbill avatar learttmorina avatar mevdschee 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

light-php's Issues

Database don't fetch results sometimes

Describe the bug
Basically, Library\Database::query sometimes don't work, only in specific cases

To Reproduce
Bug description:
Database::query don't fetch result sometimes

example:

public function thisDontWork($agenda, $start, $end)
{
        $param = array(":agenda" => $agenda, ":dia_inicio" => $start, ":dia_fin" => $end);
        return Database::query("SELECT id_tarea, datos, cast(f_inicio AS DATETIME) AS f_inicio, cast(f_fin AS DATETIME) AS f_fin, id_agenda, cita_title, id_persona FROM crm_citas WHERE id_agenda LIKE '%:agenda%' AND presente != 5 AND cita_tipo != 'BG_CIERRE' AND cita_tipo != 'NO_DAR_CITA' AND (date(f_inicio) BETWEEN ':dia_inicio' AND ':dia_fin') ORDER BY f_inicio ASC", $param);
}

public function thisOneWorks($agenda, $start, $end)
{
        return Database::$CONN->query("SELECT id_tarea, datos, cast(f_inicio AS DATETIME) AS f_inicio, cast(f_fin AS DATETIME) AS f_fin, id_agenda, cita_title, id_persona FROM crm_citas WHERE id_agenda LIKE '%".$agenda."%' AND presente != 5 AND cita_tipo != 'BG_CIERRE' AND cita_tipo != 'NO_DAR_CITA' AND (date(f_inicio) BETWEEN '".$start."' AND '".$end."') ORDER BY f_inicio ASC")->fetchAll(PDO::FETCH_ASSOC);
}

Params in the functions:
$agenda => Dra. Tuya
$start & $end => "2020-01-29"

Expected behavior
It should fetch the results, since the only difference is how I send the parameters.

Enviroment

  • OS: WIN
  • PHP 7.2

Util.php missing in system/engine

Hi,
I was trying to install light-php with composer when it run post-install.php file it gives failed to open "./system/engine/Util.php". you need to update post-install file as you have moved Util.php file under library directory.

Fatal error: Default value for parameters with a class type can only be NULL in /Users/wlin/dev/light-php/system/library/Config.php on line 22

Describe the bug

When I was trying to access the framework, I got error:

Fatal error: Default value for parameters with a class type can only be NULL in /Users/wlin/dev/light-php/system/library/Config.php on line 22

To Reproduce
Steps to reproduce the behavior:

  1. Install and run the framework by the command:

    composer create-project bakeiro/light-php
    PHP -S localhost:8080 -t light-php/
    
  2. boot the website by URL: http://localhost:8080/public/index.php?route=product/product/getProduct&prod_id=1

  3. See error

Expected behavior
No error with a hello world view on the page.

Environment

  • OS: MacOS
  • Browser: Chrome
  • PHP Version: 7.4
  • Light-PHP Version: 1.981.0.0

Check clean input

Check wether it's working or not
sysmtem/engine/Util::cleanInput()

use Library\Config; is empty

Hi, use Library\Config; is empty.

....system/library/config.php): failed to open stream: No such file or directory

Installation production... way?

Describe the bug
I had run the command composer create-project bakeiro/light-php on local.

To Reproduce
And i send all files on server. (i know it's not the good practice)

Expected behavior
The method isValidPath is no working correctly.
File does not exists....

So, my url is https://sub.domain/public

When i tried command : PHP -S localhost:8080 -t .\public
Nothing happens... xD

Could you help me?

PHP Fatal error: Uncaught Error: Class 'ZipArchive' when `composer create-project bakeiro/light-php-site`

Hi, I found Uncaught Error: Class 'ZipArchive' when trying to install light-php-site

$ composer create-project bakeiro/light-php-site

...

PHP Fatal error:  Uncaught Error: Class 'ZipArchive' not found in /home/user/light-php-site/get-source-code.php:6
Stack trace:
#0 Command line code(1): require_once()
#1 {main}
  thrown in /home/user/light-php-site/get-source-code.php on line 6
Script php -r "require_once('./get-source-code.php'); " handling the post-create-project-cmd event returned with error code 255

edit: I run Ubuntu 20.04 LTS

[Not working] installed by composer

"Forbidden
You don't have permission to access this resource.

Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/8.1.10 Server at localhost Port 80"

It's on a local XAMP server. it's on local.

Where should I look? htaccess or where should I check? I can't make it work.

Error when command 'composer create-project bakeiro/light-php-site'

Describe the bug
Here below is the error.



Creating a "bakeiro/light-php-site" project at "./light-php-site"
Info from https://repo.packagist.org: #StandWithUkraine
Cannot use bakeiro/light-php-site's latest version 0.96 as it requires php ^7.0 which is not satisfied by your platform.
Installing bakeiro/light-php-site (0.9)

  • Installing bakeiro/light-php-site (0.9): Extracting archive
    Created project in C:\xampp\htdocs\naoki\php\112022-light\light-php-site
    Loading composer repositories with package information
    Updating dependencies
    Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires bakeiro/micro_php_template_engine, it could not be found in any version, there may be a typo in the package name.

Potential causes:

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.



Enviroment

  • OS:windows

Additional context
it looks like related to bakeiro/micro_php_template_engine and "minimum-stability": "stable",

Any idea anyone?

HMVC

Interesting project. Any plans to add HMVC support? How hard would it be to import a project from CI to this?

Issue along installing.

I tried to install Light-PHP, and I got through this weird error.

light-php

What should I do to fix this?

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.