Git Product home page Git Product logo

Comments (3)

ixalsera avatar ixalsera commented on May 22, 2024 2

Was wondering the same as @mauricios as the Composer file lists no requirements and the repo itself contains no code. Thanks to the above from @florianrusch and the Symfony docs though, it looks like this is a Symfony Flex package.

@mauricios , to answer your question then, if you are using Symfony Flex in your application, then leave it in as it may be adding in the .htaccess rules (for things like CORS). If you aren't, then it's safe to remove.

However, I will go on to say that even if you are, if the .htaccess file is the only file it adds through the Flex recipe, I would only add it as a dev requirement and rather add the rules from it in to your main production Apache config for faster resolution (if you have access to the httpd.conf file), as suggested here.

from apache-pack.

Tobion avatar Tobion commented on May 22, 2024 2

This repo is only there so symfony flex can execute the recipe when installing, adding the .htaccess file automatically.
I think we should add a note in the readme of this repo to make this clear.

from apache-pack.

florianrusch avatar florianrusch commented on May 22, 2024

@mauricios if I'm correct, it should bring you the .htaccess file into your public folder. (https://symfony.com/doc/current/setup/web_server_configuration.html#adding-rewrite-rules)

It seems for me, that the .htaccess files comes from this repo: https://github.com/symfony/recipes-contrib/blob/master/symfony/apache-pack/1.0/public/.htaccess

But I have no clue how 🙈 maybe this issue could give you more informations: #1

I've added this package a view minutes ago into my symfony 4.4 project:

$ composer require symfony/apache-pack
Using version ^1.0 for symfony/apache-pack
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.4.*"
Package operations: 1 install, 0 updates, 0 removals
  - Installing symfony/apache-pack (v1.0.1): Downloading (100%)         
Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
Writing lock file
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
Symfony operations: 1 recipe (f9810c626acc52037e6c45db73be494f)
  -  WARNING  symfony/apache-pack (>=1.0): From github.com/symfony/recipes-contrib:master
    The recipe for this package comes from the "contrib" repository, which is open to community contributions.
    Review the recipe at https://github.com/symfony/recipes-contrib/tree/master/symfony/apache-pack/1.0

    Do you want to execute this recipe?
    [y] Yes
    [n] No
    [a] Yes for all packages, only for the current installation session
    [p] Yes permanently, never ask again for this project
    (defaults to n): y
  - Configuring symfony/apache-pack (>=1.0): From github.com/symfony/recipes-contrib:master
Executing script cache:clear [OK]
Executing script assets:install public [OK]

Some files may have been created or updated to configure your new packages.
Please review, edit and commit them: these files are yours.

$ ll public 
-rw-r--r--   1 florianrusch  staff   3.2K Jan  9 21:43 .htaccess
-rw-r--r--   1 florianrusch  staff   6.6K Nov  9 12:03 apple-touch-icon.png
drwxr-xr-x   6 florianrusch  staff   192B Jan  6 19:11 css
-rw-r--r--   1 florianrusch  staff   6.4K Nov  9 12:03 favicon.ico
drwxr-xr-x   7 florianrusch  staff   224B Nov 24 13:03 images
-rw-r--r--   1 florianrusch  staff   805B Jan  7 17:26 index.php
drwxr-xr-x   5 florianrusch  staff   160B Jan  6 19:11 js
drwxr-xr-x   3 florianrusch  staff    96B Nov 16 10:41 uploads

from apache-pack.

Related Issues (8)

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.