Download the PHP package tncrazvan/catpaw without Composer
On this page you can find all versions of the php package tncrazvan/catpaw. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package catpaw
What is this?
Catpaw is an opinionated dependency injection library that comes with batteries included for developing asynchronous and declarative general purpose programs.\ It leverages the amphp platform to make your program asynchronous.
Table of Contents | Description |
---|---|
📦 Container | Provide dependencies and retrieve them. |
📦 Constructors | Execute code when a dependency is resolved. |
📦 Entry | Execute code when a dependency is resolved. |
⚠️ Error Management | Manage errors. |
🌠 Server | Start a server. |
🚆 Server Router | Define routes. |
📃 Server Path Parameters | Define path parameters for your routes. |
🎫 Server Session | Manage sessions. |
📞 Server Websockets | Serve websockets. |
💠 Server Open Api | Generate an Open Api definition. |
🎛️ Command | Create a console command. |
🗄️ Database | Connect to a database and send queries. |
🗄️ Stores | Store data in memory and react to changes in said data. |
🚥 Queues | Create in memory queues and tag them. |
🚥 Signals | Create signals and react to them. |
🕐 Schedule | Schedule code execution using a human readable format. |
💡 RaspberryPi | Control your RaspberryPi's GPIOs. |
[!NOTE] This project is aimed at linux distributions, some features may or not may work on Windows and/or MacOS.\ Feel free to contribute fixing issues for specific platforms.
Get started
You will need at least php 8.3.
Create a new project using one of the starter templates.
You can start from scratch
or you can start with a web server
Program Structure
Every program must declare a main
function in the global scope, that will be your entry point.
You can run your program in one of three modes.
Development Mode
Enter Development Mode with
This mode will run your program with XDebug enabled.
[!NOTE] See section Debugging with VSCode
Watch Mode
Enter Watch Mode with
This mode will run your program with XDebug enabled and it will restart your program every time you make a change to your source code.
[!NOTE] See section Debugging with VSCode
[!NOTE] By default "source code" means the "src" directory.\ You can change this configuration in your makefile, see section
watch
, parameterresources
.
Production Mode
Enter Production Mode with
It's just as it sounds, run your program directly.\ No debuggers, not extra overhead.
Build
It is possible, but no required, to bundle your program into a single .phar
file with
The building process can be configured inside the build.ini
file.
After building your application, you can simply run it using
The resulting .phar
will include the following directories
src
vendor
.build-cache
(created at build time)
It's a portable bundle, you just need to make sure php is installed on whatever machine you're trying to run it on.
Debugging with VSCode
Install xdebug
Configure your .vscode/launch.json
Start debugging.
All versions of catpaw with dependencies
ext-mbstring Version *
ext-pcntl Version *
ext-openssl Version *
ext-zlib Version *
vlucas/phpdotenv Version ^5.4
monolog/monolog Version ^3.3
revolt/event-loop Version ^1.0
amphp/amp Version ^3.0
amphp/process Version ^2.0
amphp/byte-stream Version ^2.1
amphp/file Version ^3.0
amphp/http-server Version ^3.3
amphp/http-client Version ^5.0
amphp/parallel Version ^2.0
amphp/websocket-server Version ^4.0
twig/twig Version ^3.0