Download the PHP package plan2net/fake-fal without Composer

On this page you can find all versions of the php package plan2net/fake-fal. 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 fake-fal

plan2net/fake-fal

Create missing files on the fly for testing/development.

What does it do?

Instead of keeping gigabytes of files in sync with your test/development system, the extension creates useful fake files. It acts like a local file driver and creates missing files with the correct file signature (and in case of images in the original file's dimensions) and folders, so PHP's finfo (and others) return the correct mime type.

You can let the extension create fake files on the fly (when visiting a page in the browser) or create fake files for all files which are not available on disk at once via a command (Backend > Scheduler or command line).

Installation

Require the composer package:

composer require "plan2net/fake-fal" --dev

Activate the extension in the Extension Manager and update the settings.

You have to explicitely set the flag enable to register the fake local driver.

enable = 1 (default is 0 = inactive)

Set an image generator

imageGeneratorType = Plan2net\FakeFal\Resource\Generator\LocalFakeImageGenerator

(Currently there's only one local image generator available, so just stick with the default value)

Save the configuration.

After activating the local fake driver globally, you have to activate the fake mode for specific local storages. Either via backend (by editing the storage record) or via command line command:

fake-fal:toggle

will set all local storages to fake mode.

fake-fal:toggle 2,14,99

will set the given storages (with ID 2, 14 and 99) to fake mode.

Available Commands:

fake-fal:list

List all existing storages as a table (command line only)

fake-fal:toggle

Set given storage(s) to fake mode: check flag for fake mode, clear processed files

fake-fal:create

Create fake files within given storage(s); the existing real files will be kept

Compatibility

The recent extension version works with TYPO3 CMS 10/11 and PHP >= 7.4. Use the versions < 3.0 for TYPO3 8 and 9 and PHP >= 7.0.

Integration information

We extend the core class \TYPO3\CMS\Core\Resource\ResourceFactory to overcome the hardcoded check with is_file in the method retrieveFileOrFolderObject and we extend the core class \TYPO3\CMS\Core\Resource\ResourceStorage to reset the isOnline flag of the storage. Just be aware of this if you use any other extension doing so or extend the class yourself.

Alternatives

There's the filefill extension from Nicole Cordes.

Here's the story: I had the idea for plan2net/fake-fal for quite a while and there was a Fedex Day (a day where we explore new ideas and create cool things in our company) I wanted to create this extension. The result after one day of coding was the first working version.

This was around two weeks after Nicole published her extension. I didn't know anything about it. A week later a colleague said

Hey, I heard about an extension that sounds like yours!

At first I was dissappointed, but gladly there's quite a difference.

plan2net/fake-fal works offline and creates the files locally. Additionally the file dimensions are written into the fake images. And if you download a fake PDF it will behave like a real document.


All versions of fake-fal with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-gd Version *
ext-pdo Version *
typo3/cms-core Version ^10.4||^11
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 plan2net/fake-fal contains the following files

Loading the files please wait ....