Git Product home page Git Product logo

fatfree-devtools's Introduction

FatFree DevTools

This is a package that can aid the creation and management of your Fat-Free projects.

Note: This is not tested against Windows environments for the time being.

Usage Video

I created a basic guide to help those that want to get started with this DevTools package.

Fat-Free DevTools

https://youtu.be/2kU5S-byTwI

Installation

Installation is through Composer. If you don't have Composer, run the following command.

curl -s http://getcomposer.org/installer | php

Globally (recommended)

composer global require n0nag0n/fatfree-devtools

# or sudo if you run into permissions issues because it's configured for restricted directories
sudo composer global require n0nag0n/fatfree-devtools

Locally

composer require n0nag0n/fatfree-devtools --dev

Usage

Basic usage is provided via the bin that is installed with Composer. Most of the default installations of Composer will use vendor/bin/ and the root directory for bin files if you've installed this locally.

Otherwise, globally installations can just type fatfree. Make sure to place the ~/.composer/vendor/bin directory in your PATH so the fatfree executable can be located by your system. As such, the remainder of this readme will only use fatfree instead of vendor/bin/fatfree.

Web interface

There is a web interface that can be used instead of usage through CLI. It is recommended to use the web interface for beginners. To start up the web interface run the following command.

fatfree serve admin [--help [--port-8081 [--host=localhost]]]

Then follow the instructions output in your console for where to navigate to in your browser for the DevTools to display.

Commands

This is a list of commands currently being used in the devtools helper.

Serve

This will serve your project using the PHP built-in web server.

fatfree serve [--help [--port-8080 [--host=localhost]]]

Clear Cache

This will clear your temp cache for you.

fatfree cache clear

Help

Provides a simple help dialog.

fatfree help

Version

Outputs the version.

fatfree version

fatfree-devtools's People

Contributors

lawrence72 avatar n0nag0n 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fatfree-devtools's Issues

Plugins Install

Tried to install "F-3 Mailer" Plugin and received an error.

image

Please let me know if you need anything else.

Rick

Add Adminer

Add the adminer script to public, and create a link in the devtools header.

PHP 8.2: ${var} string interpolation deprecated

Hi, I came across this deprecation notice issue when running ./fatfree serve admin while running php 8.2.

[noel@family-desktop bin]$ ./fatfree serve admin
Using ${var} in strings is deprecated, use {$var} instead
[/opt/lampp/htdocs/f3-devtools/vendor/n0nag0n/fatfree-devtools/utils/CLI.php:180] 
[/opt/lampp/htdocs/f3-devtools/vendor/composer/ClassLoader.php:582] Base->{closure}()
[/opt/lampp/htdocs/f3-devtools/vendor/composer/ClassLoader.php:582] include('/opt/lampp/htdocs/f3-devtools/vendor/bcosca/fatfree-core/base.php')
[/opt/lampp/htdocs/f3-devtools/vendor/composer/ClassLoader.php:433] Composer\Autoload\{closure}()
[/opt/lampp/htdocs/f3-devtools/vendor/n0nag0n/fatfree-devtools/controllers/Devtools_Controller.php:38] Composer\Autoload\ClassLoader->loadClass()
[/opt/lampp/htdocs/f3-devtools/vendor/bcosca/fatfree-core/base.php:1995] n0nag0n\Devtools_Controller->adminServe()
[/opt/lampp/htdocs/f3-devtools/vendor/bcosca/fatfree-core/base.php:1793] Base->call()
[/opt/lampp/htdocs/f3-devtools/vendor/n0nag0n/fatfree-devtools/bin/fatfree:37] Base->run()
[fatfree:120] include('/opt/lampp/htdocs/f3-devtools/vendor/n0nag0n/fatfree-devtools/bin/fatfree')
Array
(
    [status] => Internal Server Error
    [code] => 500
    [text] => Using ${var} in strings is deprecated, use {$var} instead
    [trace] => [/opt/lampp/htdocs/f3-devtools/vendor/n0nag0n/fatfree-devtools/utils/CLI.php:180] 
[/opt/lampp/htdocs/f3-devtools/vendor/composer/ClassLoader.php:582] Base->{closure}()
[/opt/lampp/htdocs/f3-devtools/vendor/composer/ClassLoader.php:582] include('/opt/lampp/htdocs/f3-devtools/vendor/bcosca/fatfree-core/base.php')
[/opt/lampp/htdocs/f3-devtools/vendor/composer/ClassLoader.php:433] Composer\Autoload\{closure}()
[/opt/lampp/htdocs/f3-devtools/vendor/n0nag0n/fatfree-devtools/controllers/Devtools_Controller.php:38] Composer\Autoload\ClassLoader->loadClass()
[/opt/lampp/htdocs/f3-devtools/vendor/bcosca/fatfree-core/base.php:1995] n0nag0n\Devtools_Controller->adminServe()
[/opt/lampp/htdocs/f3-devtools/vendor/bcosca/fatfree-core/base.php:1793] Base->call()
[/opt/lampp/htdocs/f3-devtools/vendor/n0nag0n/fatfree-devtools/bin/fatfree:37] Base->run()
[fatfree:120] include('/opt/lampp/htdocs/f3-devtools/vendor/n0nag0n/fatfree-devtools/bin/fatfree')

    [level] => 8192
)
[INFO] PHP Webserver Started for Fat-Free Dev Tools. Navigate to http://localhost:8081 to view your admin console for dev tools. Press Ctrl+C to stop it!
[Sun Mar  5 00:39:06 2023] Failed to listen on localhost:8081 (reason: Address already in use)

https://php.watch/versions/8.2/$%7Bvar%7D-string-interpolation-deprecated

need a common on error handler

hi,
would like to add a on error function for example if there is no such route. bcosca already has one, would like to have your thoughts on this.

Serve admin had error on "Manage Composer" menu

I'm using Fat-Free Dev Tools v-0.1.2 and bcosca/fatfree-core v3.8, with composer that I installed with scoop package manager on Windows 11

Whenever I access Manage Composer (http://localhost:8081/manage-composer?composer=self_update) I got these on the Command Return Value panel:

Class 'Nettools\ComposerInterface\Config' not found
---
Trace : #0 C:\Users\mrashdan\scoop\persist\composer\home\vendor\bcosca\fatfree-core\base.php(1984): n0nag0n\Manage_Composer_Controller->indexAction(Object(Base), Array, 'n0nag0n\\Manage_...')
#1 C:\Users\mrashdan\scoop\persist\composer\home\vendor\bcosca\fatfree-core\base.php(1783): Base->call(Array, Array, Array)
#2 C:\Users\mrashdan\scoop\persist\composer\home\vendor\n0nag0n\fatfree-devtools\public\index.php(17): Base->run()
#3 {main}

What does it mean and how to fix it if it was an error?

Devtools not working with PHP 8.0

After installing the latest version and try to strat "fatfree serve admin" the start screens shows up. But after clicking "next" an 500 error is produced (PHP 8.0.25, F3 3.8.1):

[Wed Nov 9 16:45:15 2022] [::1]:45402 Accepted
[Wed Nov 9 16:45:15 2022] Undefined array key "title"
[Wed Nov 9 16:45:15 2022] [/srv/www/applications/fatfree-tutorials/vendor/n0nag0n/fatfree-devtools/tmp/1rhmuqyegwrps.oxaffohovz0u.php:8]
[Wed Nov 9 16:45:15 2022] [/srv/www/applications/fatfree-tutorials/vendor/n0nag0n/fatfree-devtools/tmp/1rhmuqyegwrps.oxaffohovz0u.php:8] Base->{closure}()
[Wed Nov 9 16:45:15 2022] [/srv/www/applications/fatfree-tutorials/vendor/bcosca/fatfree-core/base.php:2953] require('/srv/www/applications/fatfree-tutorials/vendor/n0nag0n/fatfree-devtools/tmp/1rhmuqyegwrps.oxaffohovz0u.php')
[Wed Nov 9 16:45:15 2022] [/srv/www/applications/fatfree-tutorials/vendor/bcosca/fatfree-core/base.php:3197] View->sandbox()
[Wed Nov 9 16:45:15 2022] [/srv/www/applications/fatfree-tutorials/vendor/n0nag0n/fatfree-devtools/tmp/1rhmuqyegwrps.2kzhuyuouyyos.php:70] Preview->render()
[Wed Nov 9 16:45:15 2022] [/srv/www/applications/fatfree-tutorials/vendor/bcosca/fatfree-core/base.php:2953] require('/srv/www/applications/fatfree-tutorials/vendor/n0nag0n/fatfree-devtools/tmp/1rhmuqyegwrps.2kzhuyuouyyos.php')
[Wed Nov 9 16:45:15 2022] [/srv/www/applications/fatfree-tutorials/vendor/bcosca/fatfree-core/base.php:3197] View->sandbox()
[Wed Nov 9 16:45:15 2022] [/srv/www/applications/fatfree-tutorials/vendor/n0nag0n/fatfree-devtools/controllers/Base_Controller.php:28] Preview->render()
[Wed Nov 9 16:45:15 2022] [/srv/www/applications/fatfree-tutorials/vendor/n0nag0n/fatfree-devtools/controllers/Init_Environment_Controller.php:57] n0nag0n\Base_Controller->renderHtml()
[Wed Nov 9 16:45:15 2022] [/srv/www/applications/fatfree-tutorials/vendor/bcosca/fatfree-core/base.php:1995] n0nag0n\Init_Environment_Controller->pageAction()
[Wed Nov 9 16:45:15 2022] [/srv/www/applications/fatfree-tutorials/vendor/bcosca/fatfree-core/base.php:1794] Base->call()

image

Kr
Michael

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.