Installation and quick start
Choose the package for the application that will host SoFinder. Framework bridges provide the browser and HTTP API; Core by itself provides neither.
| Your application | Install | Detailed steps |
|---|---|---|
| Symfony 6.4 or 7.4 | sohophp/sofinder-symfony:^1.1 | Continue below |
| Laravel 12 or 13 | sohophp/sofinder-laravel:^1.1 | Laravel integration |
| Slim 4 | sohophp/sofinder-psr15:^1.1 | Slim integration |
| Mezzio 3 | sohophp/sofinder-psr15:^1.1 | Mezzio integration |
| No framework | sohophp/sofinder-psr15:^1.1 | Plain PHP integration |
| Domain services only, no browser/API | sohophp/sofinder-core:^1.1 | Core-only integration |
Do not install the Symfony compatibility Meta Package in Laravel or PSR-15 applications: sohophp/sofinder resolves the Symfony bridge. With the documented defaults, every full integration opens at /sofinder/browser.
Symfony quick start
The following steps create an authenticated browser backed by a private local directory. For advanced ACL, delivery and UI options, continue with the complete Symfony integration guide.
Requirements
- PHP 8.1 through 8.5 with Symfony 6.4
- PHP 8.2 through 8.5 with Symfony 7.4
ext-fileinfo,ext-jsonandext-mbstring- A Symfony security firewall that authenticates users accessing SoFinder
- Optional
ext-gdorext-imagickfor thumbnails and image editing - Optional
ext-zipfor ZIP downloads
1. Install the package
composer require sohophp/sofinder-symfony:^1.1Existing applications may keep the compatible sohophp/sofinder:^1.1 Meta Package. Both package names expose the same namespace and Bundle entry point. Review the upgrade guide before changing an existing installation.
2. Register the bundle
Add the bundle to config/bundles.php if your application does not register it automatically:
<?php
return [
// ...
SohoPHP\SoFinder\SoFinderBundle::class => ['all' => true],
];3. Import the routes
Create config/routes/so_finder.yaml:
sofinder:
resource: '@SoFinderBundle/Resources/config/routes.yaml'
prefix: /sofinderThe browser is now routed at /sofinder/browser; JSON, upload, content and asset routes share the same prefix.
4. Configure a private local resource
Create config/packages/so_finder.yaml:
so_finder:
resources:
Documents:
adapter: local
root: '%kernel.project_dir%/var/sofinder/documents'
public_url: ''
delivery_mode: proxy
allowed_extensions: [txt, md, csv, tsv, rtf, pdf, doc, docx, odt, xls, xlsx, ods, ppt, pptx, odp, jpg, jpeg, png, gif, webp, avif, bmp, ico, heic, heif, tif, tiff, zip, 7z, rar, tar, gz, tgz, mp3, wav, ogg, m4a, flac, mp4, webm, mov]
max_size: 20971520
roles: [ROLE_USER]Create the directory and make it writable by the PHP runtime user:
mkdir -p var/sofinder/documentsThis recommended allowlist covers common text, PDF, Microsoft Office, OpenDocument, image, archive, audio and video files. Reduce it for resources with a narrower purpose. PHP, scripts, HTML and executable formats remain on the default denylist; an empty allowed_extensions list means “allow every extension not denied”, not “allow nothing”.
5. Protect the route
SoFinder's default authorization requires a fully authenticated Symfony user. Your application must ensure that the route prefix is covered by an appropriate firewall and access policy. For example:
# config/packages/security.yaml
security:
access_control:
- { path: '^/sofinder/live$', roles: PUBLIC_ACCESS }
- { path: '^/sofinder', roles: ROLE_USER }The host application remains responsible for its login flow and user provider.
6. Validate the installation
bin/console cache:warmup
bin/console sofinder:security:audit
bin/console sofinder:image:capabilitiesThen open /sofinder/browser as an authenticated user. Confirm that you can create a folder, upload an allowed file, download it and move it to the recycle bin.
Next steps
- Give content editors the CMS editor guide first. Use the complete file manager guide, image guide and editor integration guides as deeper references.
- Review every option in configuration.
- Choose the correct public or proxy delivery model.
- Add S3-compatible storage without pulling AWS dependencies into the core package.
- Configure maintenance and production security controls.
- Use the runnable applications in
examples/symfonyto verify Symfony 6.4 and 7.4 integration. - Build custom integrations with the developer guide and HTTP API reference.