Skip to content

Remove deprecated --https flag and devServerConfig.https option#1400

Merged
Kocal merged 1 commit intosymfony:mainfrom
Kocal:remove-deprecated-https-args
Mar 12, 2026
Merged

Remove deprecated --https flag and devServerConfig.https option#1400
Kocal merged 1 commit intosymfony:mainfrom
Kocal:remove-deprecated-https-args

Conversation

@Kocal
Copy link
Copy Markdown
Member

@Kocal Kocal commented Mar 12, 2026

Q A
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #...
License MIT

@Kocal Kocal self-assigned this Mar 12, 2026
@carsonbot carsonbot added Feature New Feature Status: Needs Review Needs to be reviewed labels Mar 12, 2026
@Kocal Kocal force-pushed the remove-deprecated-https-args branch from 8772124 to 053c4b5 Compare March 12, 2026 00:09
@Kocal Kocal added this to the 6.0 milestone Mar 12, 2026
@Kocal Kocal force-pushed the remove-deprecated-https-args branch from 053c4b5 to 03ad92b Compare March 12, 2026 00:20
@Kocal Kocal requested a review from Copilot March 12, 2026 00:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes Encore’s legacy/deprecated HTTPS toggles for webpack-dev-server and updates the test suite + changelog to use the modern devServer.server configuration and/or webpack-dev-server’s --server-type flag.

Changes:

  • Removed runtime/config plumbing for the deprecated --https flag and RuntimeConfig.devServerHttps.
  • Updated HTTPS detection to rely on devServer.server ('https' or { type: 'https' }) and adjusted tests accordingly.
  • Added/updated tests and changelog entry documenting the removal and replacements.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/config/path-util.js Adds integration tests asserting URL protocol is derived from devServer.server after running the config generator.
test/config/parse-runtime.js Removes tests tied to the deprecated --https behavior and relaxes expectations around --server-type.
test/config-generator.js Updates dev-server HTTPS test to use configureDevServerOptions({ server: 'https' }) instead of removed runtime flag.
test/bin/encore.js Adds an e2e run verifying webpack-dev-server starts with --server-type https.
lib/config/parse-runtime.js Removes parsing of deprecated HTTPS flags into runtime config.
lib/config/RuntimeConfig.js Removes devServerHttps from the runtime config shape.
lib/config-generator.js Removes devServerConfig.https support/deprecation warning and bases HTTPS detection on devServer.server.
CHANGELOG.md Adds an entry documenting removal of the deprecated flag/option and suggested alternatives.
Comments suppressed due to low confidence (1)

lib/config/parse-runtime.js:52

  • Removing the argv.serverType === 'https' path means runtimeConfig no longer carries any signal that HTTPS was enabled via the CLI. As a result, when running encore dev-server --server-type https (webpack-dev-server flag), Encore will still compute devServerFinalIsHttps=false and generate an http://... dev-server URL for output.publicPath, which can break asset loading/mixed-content. Consider persisting the parsed server type (e.g. on RuntimeConfig) and incorporating it into the devServerFinalIsHttps calculation (or otherwise detecting CLI HTTPS) so the generated publicPath matches the actual dev-server protocol.
        case 'dev-server':
            runtimeConfig.isValidCommand = true;
            runtimeConfig.environment = 'dev';
            runtimeConfig.verbose = true;

            runtimeConfig.useDevServer = true;
            runtimeConfig.devServerKeepPublicPath = argv.keepPublicPath || false;

            if (typeof argv.public === 'string') {
                runtimeConfig.devServerPublic = argv.public;
            }

            runtimeConfig.devServerHost = argv.host ? argv.host : 'localhost';
            runtimeConfig.devServerPort = argv.port ? argv.port : '8080';


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@Kocal Kocal force-pushed the remove-deprecated-https-args branch from 03ad92b to c5d7afa Compare March 12, 2026 07:17
@Kocal Kocal merged commit 5557f89 into symfony:main Mar 12, 2026
24 of 28 checks passed
@Kocal Kocal deleted the remove-deprecated-https-args branch March 12, 2026 07:27
Kocal added a commit to Kocal/webpack-encore that referenced this pull request Mar 12, 2026
Looks like I went a bit too far, the URLs generated in `entrypoints.json` and `manifest.json` were always in `http://` even when using flag `--server-type https`
Kocal added a commit that referenced this pull request Mar 12, 2026
This PR was merged into the main branch.

Discussion
----------

Follow-up #1400 (fix URLs generation)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no <!-- please update CHANGELOG.md file -->
| Deprecations? | no <!-- please update CHANGELOG.md file -->
| Issues        | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->
| License       | MIT

Looks like I went a bit too fast, the URLs generated in `entrypoints.json` and `manifest.json` were always in `http://` even when using flag `--server-type https`. That's now fixed, and tests were improved to prevent regressions.

Commits
-------

3e149b9 Follow-up #1400 (fix URLs generation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New Feature Status: Needs Review Needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants