Download the PHP package lechimp-p/php2js without Composer

On this page you can find all versions of the php package lechimp-p/php2js. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php2js

Build Status

php2js - Compiles sane PHP to JavaScript

php2js makes it possible that you write client side scripts in your favorite scripting language.

This currently is in a proof of concept stage and in now way ready for prime time.

Usage

Currently this only supports enough functionality to make the HelloWorld-example happen.

Rationale

Again, this currently is a proof of concept.

When working on a (possibly old) PHP-applications users typically expect features that need to be implemented client-side nowadays. This challenges communities of PHP-developers in two different ways.

On the one hand, client-side demands new skills and knowledge. While we may expect every contemporay PHP-developer to know its share of jquery, more complex applications demand for means that jquery never meant to provide. When switching to modern js-frameworks, like React or Vue, to implement requirements of these more complex apps, we either demand PHP-developers to acquire the skills and knowledge to use these tools or we need to add new developers to our projects that already have these skills. In both scenarios we will add new layers of complexity to our project.

On the other hand, PHP-projects will already have some code which possibly would need to be rewritten for the client-side. If, e.g., one would want to perform some validation on input on the client-side to provide quick feedback to users, the according code would need to be rewritten in javascript (or another language) and server- and client-side validation would need to be hold in sync afterwards. This will be a handicap for every PHP-project compared to projects written in language that work on client- and server-side. After all, two languages and tool chains need to be supported.

php2js attempts to solve these problems by providing a way to write client-side code in PHP, just as server-side code. Client-side code thus can be subject to the same procedures (e.g. testing or static analysis) like server-side code and can be compiled to JavaScript before deployment.

While doing this, php2js does not attempt to implement each and every feature or API of PHP, thus being able to compile to JavaScript directly instead of providing a PHP-runtime in JavaScript or figuring out (e.g.) how file-operations can be emulated in the browser.

Outlook

We are not there yet, this is a proof of concept!!1

The idea for this compiler was born when working on the UI-framework of the ILIAS Open Source LMS (on GitHub). This proof of concept will be used in discussions in the community how to proceed with the client-side functionality of the ILIAS-UI-framework. If this is ever put to real work, we most probably will add another layer over the bare JS-APIs implemented by this compiler that allow to add client-side functionality to the ILIAS-UI-framework in a structured way. This compiler thus is intended to be complemented by a client-side-framework written in PHP.


All versions of php2js with dependencies

PHP Build Version
Package Version
Requires nikic/php-parser Version 4.*.*
pimple/pimple Version 3.2.*
symfony/console Version 3.4.*
psr/log Version 1.0.0
composer/composer Version 1.8.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lechimp-p/php2js contains the following files

Loading the files please wait ....