Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial configuration and setup for MVola bundle #1665

Closed
wants to merge 4 commits into from

Conversation

dahromy
Copy link
Contributor

@dahromy dahromy commented Sep 12, 2024

Added a manifest.json and a dahromy_glide.yaml to configure the Glide bundle in Symfony. The manifest.json includes the bundle and its environment-specific parameters, while the dahromy_glide.yaml sets up source, cache locations and the glide signature key.
Add 'gd' driver to dahromy_glide configuration

The gd library driver has been added to the dahromy_glide.yaml configuration file. This change enables image processing capabilities provided by the gd library in the dahromy/glide-symfony project.

# This is the commit message #2:

Add base_url to glide configuration

In the dahromy_glide.yaml configuration file, a new line specifying the base_url for image storage has been added. This amendment allows the glide library to know where to store and retrieve images.

# This is the commit message #3:

Add newline at the end of glide.yaml file

A newline has been added at the end of the dahromy_glide.yaml file. This is in accordance with standard coding practices and helps to prevent any potential parsing errors due to the absence of a newline.

# This is the commit message #4:

Remove 'gd' driver and base_url from glide config

The 'gd' driver and the 'base_url' configuration option have been removed from the Glide configuration. Other default configuration options can be added as needed. This change simplifies the default configuration.

# This is the commit message #5:

Move manifest and config files to 1.0 directory

All manifest and config files have been moved to a newly created 1.0 directory. This change is to improve file organization and version control. The structure change does not bring any functionality differences.

# This is the commit message #6:

Add PHP version conflict in manifest.json

The update adds a "conflict" field to the manifest.json which restricts the usage of the package with PHP versions less than 8.0. This ensures that the application is run on the supported PHP versions, preventing any compatibility issues.

# This is the commit message #7:

Add new project files and update configuration

This commit introduces new .idea project files and updates DahRomy Glide Bundle routes and configuration. The various .idea files correspond to Project Modules, Git Toolbox settings and PHP options. Additionally, the Glide configuration has been altered to change the source directory and the signature key has been removed.

Add new project files and update configuration

This commit introduces new .idea project files and updates DahRomy Glide Bundle routes and configuration. The various .idea files correspond to Project Modules, Git Toolbox settings and PHP options. Additionally, the Glide configuration has been altered to change the source directory and the signature key has been removed.

Add newline at end of YAML files and clean up .idea

- Add newline at end of YAML configuration files
- Remove .idea directory
- Add .idea to .gitignore

Add newline at end of YAML configuration files

Two YAML configuration files in the glide-symfony project lacked a newline character at the end of the file. These have been added to the `glide.yaml` file in both the routes and packages directories, following the POSIX standards for text files.

Remove .idea directory

Add .idea to .gitignore

Remove .gitignore
Copy link

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1665/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1665/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'dahromy/glide-symfony:^1.0' 'dahromy/mvola-bundle:^1.0' 'nelmio/api-doc-bundle:^3.0'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

nelmio/api-doc-bundle

2.13 vs 3.0
diff --git a/nelmio/api-doc-bundle/2.13/config/packages/nelmio_api_doc.yaml b/nelmio/api-doc-bundle/3.0/config/packages/nelmio_api_doc.yaml
index 4ee4142d..30767e1e 100644
--- a/nelmio/api-doc-bundle/2.13/config/packages/nelmio_api_doc.yaml
+++ b/nelmio/api-doc-bundle/3.0/config/packages/nelmio_api_doc.yaml
@@ -1,22 +1,9 @@
-#nelmio_api_doc:
-#    exclude_sections:     []
-#    default_sections_opened:  true
-#    motd:
-#        template:             'NelmioApiDocBundle::Components/motd.html.twig'
-#    request_listener:
-#        enabled:              true
-#        parameter:            _doc
-#    swagger:
-#        api_base_path:        /api
-#        swagger_version:      '1.2'
-#        api_version:          '0.1'
-#        info:
-#            title:                Symfony2
-#            description:          'My awesome Symfony2 app!'
-#            TermsOfServiceUrl:    null
-#            contact:              null
-#            license:              null
-#            licenseUrl:           null
-#    cache:
-#        enabled:              false
-#        file:                 '%kernel.cache_dir%/api-doc.cache'
+nelmio_api_doc:
+    documentation:
+        info:
+            title: My App
+            description: This is an awesome app!
+            version: 1.0
+    areas: # to filter documented areas
+        path_patterns:
+            - ^/api(?!/doc$) # Accepts routes under /api except /api/doc
diff --git a/nelmio/api-doc-bundle/2.13/config/routes/nelmio_api_doc.yaml b/nelmio/api-doc-bundle/3.0/config/routes/nelmio_api_doc.yaml
index 58ebd413..364b4af0 100644
--- a/nelmio/api-doc-bundle/2.13/config/routes/nelmio_api_doc.yaml
+++ b/nelmio/api-doc-bundle/3.0/config/routes/nelmio_api_doc.yaml
@@ -1,3 +1,12 @@
-NelmioApiDocBundle:
-    resource: "@NelmioApiDocBundle/Resources/config/routing.yml"
-    prefix:   /api/doc
+# Expose your documentation as JSON swagger compliant
+app.swagger:
+    path: /api/doc.json
+    methods: GET
+    defaults: { _controller: nelmio_api_doc.controller.swagger }
+
+## Requires the Asset component and the Twig bundle
+## $ composer require twig asset
+#app.swagger_ui:
+#    path: /api/doc
+#    methods: GET
+#    defaults: { _controller: nelmio_api_doc.controller.swagger_ui }

@dahromy dahromy closed this Sep 12, 2024
auto-merge was automatically disabled September 12, 2024 08:45

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant