From c929669e45f42180a816e4baad1ce0df8ffff5da Mon Sep 17 00:00:00 2001 From: Aasawari Date: Fri, 7 Feb 2025 21:15:46 +0530 Subject: [PATCH 1/5] Updaing the workship with steps to install openssl and compile using openssl and also using correct field nam es to the script files --- docs/30-quick-start.mdx | 9 +++++++- docs/40-structure-site/1-app-overview.mdx | 26 +++++++++++----------- docs/40-structure-site/1-initial-setup.mdx | 6 ++--- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/docs/30-quick-start.mdx b/docs/30-quick-start.mdx index c6007f7..d92fab0 100644 --- a/docs/30-quick-start.mdx +++ b/docs/30-quick-start.mdx @@ -20,6 +20,13 @@ composer create-project symfony/skeleton rentals ```shell cd rentals + ## Compile the PHP code on MacOS using openssl + brew install openssl + export OPENSSL_DIR=$(brew --prefix openssl) + export LDFLAGS="-L$OPENSSL_DIR/lib" + export CPPFLAGS="-I$OPENSSL_DIR/include" + export PKG_CONFIG_PATH="$OPENSSL_DIR/lib/pkgconfig" + pecl install mongodb ``` Verify the `php.ini` file to point to the installed `mongodb.so`. @@ -66,7 +73,7 @@ doctrine_mongodb: auto_generate_hydrator_classes: true connections: default: - server: '%env(resolve:MONGODB_URL)%&appName=devrel.content.php' + server: '%env(resolve:MONGODB_URL)%' options: {} default_database: '%env(resolve:MONGODB_DB)%' document_managers: diff --git a/docs/40-structure-site/1-app-overview.mdx b/docs/40-structure-site/1-app-overview.mdx index 21f3574..278bdee 100644 --- a/docs/40-structure-site/1-app-overview.mdx +++ b/docs/40-structure-site/1-app-overview.mdx @@ -26,29 +26,29 @@ Collections: }, "name": "Fahey, Leannon and Gleichner", "location": "Elisabethland", - "night_cost": 415, + "nightCost": 415, "availability": [ { - "start_date": { + "startDate": { "$date": "2024-01-01T00:00:00.000Z" }, - "end_date": { + "endDate": { "$date": "2024-04-16T00:00:00.000Z" } }, { - "start_date": { + "startDate": { "$date": "2024-04-21T00:00:00.000Z" }, - "end_date": { + "endDate": { "$date": "2024-04-25T00:00:00.000Z" } }, { - "start_date": { + "startDate": { "$date": "2024-05-01T00:00:00.000Z" }, - "end_date": { + "endDate": { "$date": "2025-01-01T00:00:00.000Z" } } @@ -63,14 +63,14 @@ The document above represents a rental listing. It has a name, location, night_c "_id": { "$oid": "65dca21600a610ba8536b343" }, - "rental_id": "65dca21600a610ba8536b343", - "rental_name": "Fahey, Leannon and Gleichner", - "night_cost": 415, - "total_cost": 1245, - "start_date": { + "rental": "65dca21600a610ba8536b343", + "rentalName": "Fahey, Leannon and Gleichner", + "nightCost": 415, + "totalCost": 1245, + "startDate": { "$date": "2024-04-17T00:00:00.000Z" }, - "end_date": { + "endDate": { "$date": "2024-04-20T00:00:00.000Z" } } diff --git a/docs/40-structure-site/1-initial-setup.mdx b/docs/40-structure-site/1-initial-setup.mdx index 9fdacdf..ef2d5a2 100644 --- a/docs/40-structure-site/1-initial-setup.mdx +++ b/docs/40-structure-site/1-initial-setup.mdx @@ -396,11 +396,11 @@ for (let i = 0; i < 100; i++) { rentals.push({ name: falso.randCompanyName(), location: falso.randCity(), - night_cost: falso.randNumber({ min: 50, max: 500 }), // Random cost between 50 and 500 + nightCost: falso.randNumber({ min: 50, max: 500 }), // Random cost between 50 and 500 availability: [ { - start_date: new Date('2024-01-01'), - end_date: new Date('2026-01-01') + startDate: new Date('2024-01-01'), + endDate: new Date('2026-01-01') } ] }); From 141a7c1c3bfbcc742ca1153a8f1be5339acbf711 Mon Sep 17 00:00:00 2001 From: Aasawari Date: Sat, 15 Feb 2025 18:56:54 +0530 Subject: [PATCH 2/5] Adding fixes after code review --- docs/40-structure-site/1-app-overview.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/40-structure-site/1-app-overview.mdx b/docs/40-structure-site/1-app-overview.mdx index 278bdee..abce1fb 100644 --- a/docs/40-structure-site/1-app-overview.mdx +++ b/docs/40-structure-site/1-app-overview.mdx @@ -63,7 +63,7 @@ The document above represents a rental listing. It has a name, location, night_c "_id": { "$oid": "65dca21600a610ba8536b343" }, - "rental": "65dca21600a610ba8536b343", + "rental": {"$ref":"rentals","$id":{"$oid":"65dca21600a610ba8536b343"}}, "rentalName": "Fahey, Leannon and Gleichner", "nightCost": 415, "totalCost": 1245, From ae02dc5e91e1271ff3d7cdcb25b21ecfd6a7400a Mon Sep 17 00:00:00 2001 From: Aasawari Date: Tue, 25 Feb 2025 16:34:35 +0530 Subject: [PATCH 3/5] Documenting to add pkgconf before installing mongodb driver --- docs/30-quick-start.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/30-quick-start.mdx b/docs/30-quick-start.mdx index d92fab0..4b3fb84 100644 --- a/docs/30-quick-start.mdx +++ b/docs/30-quick-start.mdx @@ -18,15 +18,15 @@ composer create-project symfony/skeleton rentals + With MacOS, users will need to make sure to install pkgconf from homebrew as mentioned [here](https://formulae.brew.sh/formula/pkgconf) using the command + ```shell - cd rentals - ## Compile the PHP code on MacOS using openssl - brew install openssl - export OPENSSL_DIR=$(brew --prefix openssl) - export LDFLAGS="-L$OPENSSL_DIR/lib" - export CPPFLAGS="-I$OPENSSL_DIR/include" - export PKG_CONFIG_PATH="$OPENSSL_DIR/lib/pkgconfig" + brew install pkgconf + ``` + Once installed, you can start with mongodb driver installation for PHP + ```shell + cd rentals pecl install mongodb ``` Verify the `php.ini` file to point to the installed `mongodb.so`. From 3c11f170429b25bcb6a86614e8c13112f922f38b Mon Sep 17 00:00:00 2001 From: Aasawari Date: Tue, 11 Mar 2025 15:35:30 +0530 Subject: [PATCH 4/5] Modifyng the sentence after review --- docs/30-quick-start.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/30-quick-start.mdx b/docs/30-quick-start.mdx index 4b3fb84..f58a6d3 100644 --- a/docs/30-quick-start.mdx +++ b/docs/30-quick-start.mdx @@ -18,7 +18,7 @@ composer create-project symfony/skeleton rentals - With MacOS, users will need to make sure to install pkgconf from homebrew as mentioned [here](https://formulae.brew.sh/formula/pkgconf) using the command + With MacOS, users will need to make sure to install pkg-config from Homebrew as mentioned [Homebrew documentations](https://formulae.brew.sh/formula/pkgconf) using the command ```shell brew install pkgconf From f3f1f2e8d23c8dd2b6e5fabd0f9b243799382250 Mon Sep 17 00:00:00 2001 From: Aasawari Date: Thu, 13 Mar 2025 14:51:41 +0530 Subject: [PATCH 5/5] Adding command to install openssl before pkgconf --- docs/30-quick-start.mdx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/30-quick-start.mdx b/docs/30-quick-start.mdx index f58a6d3..4b80518 100644 --- a/docs/30-quick-start.mdx +++ b/docs/30-quick-start.mdx @@ -18,11 +18,19 @@ composer create-project symfony/skeleton rentals - With MacOS, users will need to make sure to install pkg-config from Homebrew as mentioned [Homebrew documentations](https://formulae.brew.sh/formula/pkgconf) using the command + + With MacOS, ensure that OpenSSL is installed on your system. You can install it using Homebrew with the following command: + + ```shell + brew install openssl + ``` + + Next, install pkgconf using Homebrew, as mentioned in the [Homebrew documentation](https://formulae.brew.sh/formula/pkgconf): ```shell brew install pkgconf ``` + Once installed, you can start with mongodb driver installation for PHP ```shell