Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 1 addition & 36 deletions .github/policies/msgraph-sdk-php-core-branch-protection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,6 @@ resource: repository
configuration:
branchProtectionRules:

- branchNamePattern: dev
# This branch pattern applies to the following branches as of 08/30/2023:
# dev

# Specifies whether this branch can be deleted. boolean
allowsDeletions: false
# Specifies whether forced pushes are allowed on this branch. boolean
allowsForcePushes: false
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
dismissStaleReviews: true
# Specifies whether admins can overwrite branch protection. boolean
isAdminEnforced: false
# Indicates whether "Require a pull request before merging" is enabled. boolean
requiresPullRequestBeforeMerging: true
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
requiredApprovingReviewsCount: 1
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
requireCodeOwnersReview: true
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
requiresCommitSignatures: false
# Are conversations required to be resolved before merging? boolean
requiresConversationResolution: true
# Are merge commits prohibited from being pushed to this branch. boolean
requiresLinearHistory: false
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
requiredStatusChecks:
- check-php-version-matrix
- SonarCloud Code Analysis
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
requiresStrictStatusChecks: true
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
restrictsPushes: false
# Restrict who can dismiss pull request reviews. boolean
restrictsReviewDismissals: false

- branchNamePattern: main
# This branch pattern applies to the following branches as of 08/30/2023:
# main
Expand Down Expand Up @@ -72,7 +37,7 @@ configuration:
requiredStatusChecks:
- check-php-version-matrix
- SonarCloud Code Analysis
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
# Require branches to be up-to-date before merging. Requires requiredStatusChecks. boolean
requiresStrictStatusChecks: true
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
restrictsPushes: false
Expand Down
3 changes: 3 additions & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
manifest: true
primaryBranch: main
handleGHRelease: true
4 changes: 2 additions & 2 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: "Validate Pull Request"

on:
push:
branches: [ main, dev ]
branches: [ main ]
pull_request:
branches: [ main, dev ]
branches: [ main ]

defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project-auto-add.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types:
- opened
branches:
- "dev"
- "main"

jobs:
track_issue:
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/tag-release.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: "Update Docs"

on:
push:
branches: dev
branches: main

defaults:
run:
Expand Down Expand Up @@ -49,4 +49,4 @@ jobs:
LABELS: generated
run: |
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
bin/hub pull-request -b dev -m "$MESSAGE_TITLE" -m "$MESSAGE_BODY" -l "$LABELS"
bin/hub pull-request -b main -m "$MESSAGE_TITLE" -m "$MESSAGE_BODY" -l "$LABELS"
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "2.1.1"
}
41 changes: 36 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,55 @@
# Contributing to the Microsoft Graph PHP SDK Core
Thanks for considering making a contribution! Read over our guidelines and we will do our best to see your PRs merged successfully.
Thanks for considering making a contribution! Read over our guidelines, and we will do our best to see your PRs merged successfully.

**NOTE**: A signed a contribution license agreement is required for all contributions and is checked automatically on new pull requests. You will be asked to read and sign the agreement https://cla.microsoft.com/ after submitting a request to this repository.

There are a few different recommended paths to get contributions into the released version of this library.

## File issues
The best way to get started with a contribution is to start a dialog with us. Sometimes features will be under development or out of scope for this library and it's best to check before starting work on contribution, especially for large work items.
The best way to get started with a contribution is to start a dialog with us. Sometimes features will be under development or out of scope for this library, and it's best to check before starting work on contribution, especially for large work items.

## Commit message format

To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/)
format.

Each commit message consists of a **header**, an optional **body** and an optional **footer**. The header is the first line of the commit and
MUST have a **type** (see below for a list of types) and a **description**. An optional **scope** can be added to the header to give extra context.

```
<type>[optional scope]: <short description>
<BLANK LINE>
<optional body>
<BLANK LINE>
<optional footer(s)>
```

The recommended commit types used are:

- **feat** for feature updates (increments the _minor_ version)
- **fix** for bug fixes (increments the _patch_ version)
- **perf** for performance related changes e.g. optimizing an algorithm
- **refactor** for code refactoring changes
- **test** for test suite updates e.g. adding a test or fixing a test
- **style** for changes that don't affect the meaning of code. e.g. formatting changes
- **docs** for documentation updates e.g. ReadMe update or code documentation updates
- **build** for build system changes (gradle updates, external dependency updates)
- **ci** for CI configuration file changes e.g. updating a pipeline
- **chore** for miscellaneous non-sdk changes in the repo e.g. removing an unused file

Adding a footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version.

## Pull requests
If you are making documentation changes, feel free to submit a pull request against the **master** branch. All other pull requests should be submitted against the **dev** branch or a specific feature branch. The master branch is intended to represent the code released in the most-recent composer package.
If you are making documentation changes, feel free to submit a pull request against the **main** branch. All other pull requests should be submitted against the **main** branch or a specific feature branch. The **main** branch is intended to represent the code released in the most-recent composer package.

When a new package is about to be released, changes in dev will be merged into master. The package will be generated from master.
When a new package is about to be released, the release PR will be merged into main. The package will be generated from main.

Some things to note about this project:

### How the library is built
The PHP SDK has a handwritten set of core files.


However, this is evaluated on a case-by-case basis. If the library is missing v1.0 Graph functionality that you wish to utilize, please [file an issue](https://github.com/microsoftgraph/msgraph-sdk-php-core/issues).

We do our best to prevent breaking changes from being introduced into the library during this process. If you find a breaking change, please file an issue and we will work to get this resolved ASAP.
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ To install the `microsoft-graph-core` library with Composer, either run `compose
```
{
"require": {
// x-release-please-start-version
"microsoft/microsoft-graph-core": "^2.1.1"
// x-release-please-end
}
}
```
## Get started with Microsoft Graph

### 1. Register your application

Register your application to use the Microsoft Graph API by following the steps at [Register an an application with the Microsoft Identity platform](https://aka.ms/registerApplication).
Register your application to use the Microsoft Graph API by following the steps at [Register an application with the Microsoft Identity platform](https://aka.ms/registerApplication).

### 2. Authenticate with the Microsoft Graph service

Expand Down Expand Up @@ -129,7 +131,7 @@ View or log issues on the [Issues](https://github.com/microsoftgraph/msgraph-sdk

## Contribute

Please read our [Contributing](https://github.com/microsoftgraph/msgraph-sdk-php-core/blob/master/CONTRIBUTING.md) guidelines carefully for advice on how to contribute to this repo.
Please read our [Contributing](https://github.com/microsoftgraph/msgraph-sdk-php-core/blob/main/CONTRIBUTING.md) guidelines carefully for advice on how to contribute to this repo.

## Copyright and license

Expand Down
25 changes: 25 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"bootstrap-sha": "66656259cea9373d96101ba2f81e0e0b80d7554b",
"exclude-paths": [
".git",
".idea",
".github",
".vscode",
"tests",
"scripts"
],
"release-type": "simple",
"include-component-in-tag": false,
"include-v-in-tag": true,
"packages": {
".": {
"package-name": "microsoft/microsoft-graph-core",
"changelog-path": "CHANGELOG.md",
"extra-files": [
"src/GraphConstants.php",
"README.md"
]
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
99 changes: 0 additions & 99 deletions scripts/IncrementMinorVersion.php

This file was deleted.

4 changes: 3 additions & 1 deletion src/GraphConstants.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ final class GraphConstants
const REST_ENDPOINT = "https://graph.microsoft.com/";

// Define HTTP request constants
const SDK_VERSION = "2.1.0";
// x-release-please-start-version
const SDK_VERSION = "2.1.1";
// x-release-please-end

// Define error constants
const MAX_PAGE_SIZE = 999;
Expand Down